package com.aspose.cells;

import java.util.ArrayList;
import java.util.List;

final class zau {
   static ArrayList a(zn var0, zif var1, zbcp var2, com.aspose.cells.b.a.b.zp var3, float var4, double var5, int var7) throws Exception {
      ArrayList var8 = new ArrayList();
      if (var7 < 2) {
         return var8;
      } else {
         int var9 = var2.af();
         zbo var10;
         zbo var11;
         if (var9 == 1) {
            var11 = var1.e();
            var10 = var1.E();
         } else {
            var11 = var1.g();
            var10 = var1.G();
         }

         if (var11.k() == 2) {
            return a(var0, var1, var2, var3, var4, (float)var5);
         } else {
            zbcr var12 = var1.z();
            int var13 = var12.getCount();
            double var14 = var10.n() ? zbuk.e(var10.z()) : var10.z();
            double var16 = var10.n() ? zbuk.e(var10.D()) : var10.D();
            var5 = var10.n() ? zbuk.e(var5) : var5;
            boolean var18 = var2.L();
            zalv var19 = var2.O();
            boolean var20 = false;
            int var21 = var7;
            if (var11.p) {
               var21 = (int)var11.z();
            }

            int var50;
            if (!var11.f() && !var1.u()) {
               var50 = var21 - 1;
               if (var50 == 0) {
                  var50 = 1;
               }
            } else {
               var50 = var21;
            }

            double var22 = (double)var3.e() / (double)var50;
            int var24 = var2.ai();
            ArrayList var25 = new ArrayList();
            ArrayList var26 = new ArrayList();
            zjf var27 = var2.D();
            byte var28 = -1;
            byte var29 = 1;

            for(int var30 = 0; var30 < var21; ++var30) {
               zjd var31 = var27.b(var30);
               double var32 = (double)((float)var22 * (float)var30);
               if (var11.f() || var1.u()) {
                  var32 += (double)((float)(var22 / 2.0D));
               }

               if (var11.p()) {
                  var32 = (double)(var3.c() + var3.e()) - var32;
               } else {
                  var32 += (double)var3.c();
               }

               if (var31 != null && !var31.a()) {
                  if (var31.v() > 0.0D && var28 != 1) {
                     var28 = 1;
                  } else if (var31.v() < 0.0D && var29 != -1) {
                     var29 = -1;
                  }

                  double var52 = (double)var4;
                  double var36 = var31.v();
                  double var38 = (var36 - var5) / (var14 - var16) * (double)var3.f();
                  if (!var10.p()) {
                     var52 -= var38;
                  } else {
                     var52 += var38;
                  }

                  com.aspose.cells.b.a.b.zo var40 = new com.aspose.cells.b.a.b.zo((float)var32, (float)var52);
                  if (!var2.z().e() && var30 == var21 - 1 && (float)var3.i() - var40.d() <= 1.0F) {
                     var40.a(var40.d() + 1.0F);
                  }

                  a(var40, var25);
                  zsp var41 = var2.x();
                  double var42 = 0.0D;
                  double var44 = 0.0D;
                  float var46 = 0.0F;
                  float var47 = 0.0F;
                  if (var41 != null) {
                     switch(var41.g()) {
                     case 0:
                        double var48 = var41.e().size() > var30 ? var41.a(var41.e().get(var30)) : 0.0D;
                        var42 = var48;
                        var48 = var41.f().size() > var30 ? var41.a(var41.f().get(var30)) : 0.0D;
                        var44 = var48;
                        break;
                     case 1:
                        var42 = var41.c();
                        var44 = var42;
                        break;
                     case 2:
                        var42 = var41.c() * var36 / 100.0D;
                        var44 = -var42;
                     }

                     var46 = (float)var42 / (float)(var14 - var16) * (float)var3.f();
                     var47 = (float)var44 / (float)(var14 - var16) * (float)var3.f();
                  }

                  var41.a(var40, var46, var47);
               } else if (var31 == null) {
                  com.aspose.cells.b.a.a.ze.a(var26, (Object)var30);
               } else {
                  com.aspose.cells.b.a.b.zo var34 = new com.aspose.cells.b.a.b.zo((float)var32, var4);
                  a(var34, var25);
               }
            }

            byte var51 = 0;
            if (var28 > 0 && var29 > 0) {
               var51 = 1;
            } else if (var28 < 0 && var29 < 0) {
               var51 = 2;
            } else if (var28 > 0 && var29 < 0) {
               var51 = 3;
            }

            a(var0, var2, var25, var26, var4, var18, var19, var8, var11, var3, var51);
            return var8;
         }
      }
   }

   private static ArrayList a(zn var0, zif var1, zbcp var2, com.aspose.cells.b.a.b.zp var3, float var4, float var5) throws Exception {
      ArrayList var6 = new ArrayList();
      int var7 = var2.af();
      zbcr var8 = var1.z();
      int var9 = var8.getCount();
      zbo var10;
      zbo var11;
      ArrayList var12;
      if (var7 == 1) {
         var11 = var1.e();
         var10 = var1.E();
         var12 = zhz.a((List)var1.z().c(), var1.S());
      } else {
         var11 = var1.g();
         var10 = var1.G();
         var12 = zhz.a((List)var1.z().d(), var1.S());
      }

      double var13 = var10.D();
      double var15 = var10.z();
      boolean var17 = var2.L();
      zalv var18 = var2.O();
      int var19 = var12.size();
      int var20 = var11.j();
      int var21 = (int)var11.D();
      int var22 = (int)var11.z();
      boolean var23 = false;
      int var49;
      if (!var11.f() && !var1.u()) {
         var49 = zbq.a(var20, var22, var21, var1.S());
         if (var49 == 0) {
            var49 = 1;
         }
      } else {
         var49 = zbq.a(var20, var22, var21, var1.S()) + 1;
      }

      double var24 = (double)var3.e() / (double)var49;
      float var26 = 0.0F;
      int var27 = var2.ai();
      ArrayList var28 = new ArrayList();
      ArrayList var29 = new ArrayList();

      for(int var30 = 0; var30 < var19; ++var30) {
         zjd var31 = var2.D().b(var30);
         int var32 = com.aspose.cells.b.a.zo.a(com.aspose.cells.b.a.zr.a(var12.get(var30)));
         var32 = zbq.a(var20, var32, var1.S());
         int var33 = zbq.a(var20, var32, var21, var1.S());
         float var34 = (float)(var24 * (double)var33);
         var26 = (float)(var24 * (double)zbq.a(var20, zbq.a(var11.j(), var11.y(), (int)var11.x(), var32, var1.S()), var32, var1.S()));
         if (var11.f() || var1.u()) {
            var34 += (float)(var24 / 2.0D);
         }

         float var35 = 0.0F;
         if (var11.p()) {
            var35 = (float)(var3.c() + var3.e()) - var34;
         } else {
            var35 = (float)var3.c() + var34;
         }

         if (var31 != null && !var31.a()) {
            float var37 = (float)var31.v();
            float var38 = (float)((double)(var37 - var5) / (var15 - var13) * (double)var3.f());
            float var50;
            if (!var10.p()) {
               var50 = var4 - var38;
            } else {
               var50 = var4 + var38;
            }

            com.aspose.cells.b.a.b.zo var39 = new com.aspose.cells.b.a.b.zo(var35, var50);
            a(var39, var28);
            zsp var40 = var2.x();
            double var41 = 0.0D;
            double var43 = 0.0D;
            float var45 = 0.0F;
            float var46 = 0.0F;
            if (var40 != null) {
               switch(var40.g()) {
               case 0:
                  double var47 = var40.e().size() > var30 ? var40.a(var40.e().get(var30)) : 0.0D;
                  var41 = var47;
                  var47 = var40.f().size() > var30 ? var40.a(var40.f().get(var30)) : 0.0D;
                  var43 = var47;
                  break;
               case 1:
                  var41 = var40.c();
                  var43 = var41;
                  break;
               case 2:
                  var41 = var40.c() * (double)var37 / 100.0D;
                  var43 = -var41;
               }

               var45 = (float)var41 / (float)(var10.z() - var10.D()) * (float)var3.f();
               var46 = (float)var43 / (float)(var10.z() - var10.D()) * (float)var3.f();
            }

            var40.a(var39, var45, var46);
         } else if (var31 == null) {
            com.aspose.cells.b.a.a.ze.a(var29, (Object)var30);
         } else {
            com.aspose.cells.b.a.b.zo var36 = new com.aspose.cells.b.a.b.zo(var35, var4);
            a(var36, var28);
         }
      }

      a(var0, var2, var28, var29, var4, var17, var18, var6, var11, var3, 1);
      return var6;
   }

   static ArrayList a(zn var0, zif var1, zbcp var2, com.aspose.cells.b.a.b.zp var3, float var4, int var5) throws Exception {
      ArrayList var6 = new ArrayList();
      if (var5 < 2) {
         return var6;
      } else {
         int var7 = var2.af();
         byte var8 = 1;
         zbo var9;
         zbo var10;
         if (var7 == 1) {
            var10 = var1.e();
            var9 = var1.E();
         } else {
            var10 = var1.g();
            var9 = var1.G();
         }

         if (var10.k() == 2) {
            return c(var0, var1, var2, var3, var4, var7);
         } else {
            float var11 = 0.0F;
            if (!var9.p()) {
               var11 = (float)var3.d() + (float)var9.z() / (float)(var9.z() - var9.D()) * (float)var3.f();
            } else {
               var11 = (float)var3.j() - (float)var9.z() / (float)(var9.z() - var9.D()) * (float)var3.f();
            }

            zbcr var12 = var1.z();
            int var13 = var12.getCount();
            double var14 = var9.D();
            double var16 = var9.z();
            boolean var18 = var2.L();
            zalv var19 = var2.O();
            boolean var20 = false;
            int var21 = var5;
            if (var10.p) {
               var21 = (int)var10.z();
            }

            int var57;
            if (!var10.f() && !var1.u()) {
               var57 = var21 - 1;
               if (var57 == 0) {
                  var57 = 1;
               }
            } else {
               var57 = var21;
            }

            double var22 = (double)var3.e() / (double)var57;
            ArrayList var24 = new ArrayList();
            List var25 = var12.a(var7, new int[]{var8});
            ArrayList var26 = new ArrayList();
            int var27 = var12.a(var2, var7, new int[]{var8});
            zbcp var28 = null;
            if (var27 > 0) {
               var28 = var12.a(var27 - 1, var7, new int[]{var8});
            }

            if (var28 != null) {
               com.aspose.cells.b.a.a.ze.a(var26, (Object)var28);
            }

            com.aspose.cells.b.a.a.ze.a(var26, (Object)var2);

            for(int var29 = 0; var29 < var26.size(); ++var29) {
               zbcp var30 = (zbcp)var26.get(var29);
               int var31 = var12.a(var30, var7, new int[]{var8});
               int var32 = var30.ai();
               ArrayList var33 = new ArrayList();
               zjf var34 = var12.c(var32).D();

               for(int var35 = 0; var35 < var5; ++var35) {
                  zjd var36 = var34.b(var35);
                  double var37 = (double)((float)var22 * (float)var35);
                  if (var10.f() || var1.u()) {
                     var37 += (double)((float)(var22 / 2.0D));
                  }

                  if (var10.p()) {
                     var37 = (double)(var3.c() + var3.e()) - var37;
                  } else {
                     var37 += (double)var3.c();
                  }

                  if (var36 != null && !var36.a()) {
                     double var58 = var36.v();
                     double var41 = var58;

                     for(int var43 = 0; var43 < var31; ++var43) {
                        zjd var44 = ((zbcp)var25.get(var43)).D().b(var35);
                        if (var44 != null) {
                           double var45 = var44.v();
                           var41 += var45;
                        }
                     }

                     float var54 = (float)(Math.abs(var41) / (var9.z() - var9.D()) * (double)var3.f());
                     if (!var9.p()) {
                        if (var41 <= 0.0D) {
                           var54 += var11;
                        } else {
                           var54 = var11 - var54;
                        }
                     } else if (var41 <= 0.0D) {
                        var54 = var11 - var54;
                     } else {
                        var54 += var11;
                     }

                     com.aspose.cells.b.a.b.zo var55 = new com.aspose.cells.b.a.b.zo((float)var37, var54);
                     a(var55, var33);
                     if (var30.equals(var2)) {
                        zsp var56 = var2.x();
                        double var46 = 0.0D;
                        double var48 = 0.0D;
                        float var50 = 0.0F;
                        float var51 = 0.0F;
                        if (var56 != null) {
                           switch(var56.g()) {
                           case 0:
                              double var52 = var56.e().size() > var35 ? var56.a(var56.e().get(var35)) : 0.0D;
                              var46 = var52;
                              var52 = var56.f().size() > var35 ? var56.a(var56.f().get(var35)) : 0.0D;
                              var48 = var52;
                              break;
                           case 1:
                              var46 = var56.c();
                              var48 = var46;
                              break;
                           case 2:
                              var46 = var56.c() * var58 / 100.0D;
                              var48 = -var46;
                           }

                           var50 = (float)var46 / (float)(var9.z() - var9.D()) * (float)var3.f();
                           var51 = (float)var48 / (float)(var9.z() - var9.D()) * (float)var3.f();
                        }

                        var56.a(var55, var50, var51);
                     }
                  } else {
                     com.aspose.cells.b.a.b.zo var39 = new com.aspose.cells.b.a.b.zo((float)var37, var4);

                     for(int var40 = var29; var40 > 0; --var40) {
                        if (((ArrayList)((ArrayList)var24.get(var40 - 1))).get(var35) != null) {
                           var39 = (com.aspose.cells.b.a.b.zo)((com.aspose.cells.b.a.b.zo)((ArrayList)((ArrayList)var24.get(var40 - 1))).get(var35));
                           break;
                        }
                     }

                     if (var29 == 0) {
                        var39 = new com.aspose.cells.b.a.b.zo((float)var37, var4);
                     }

                     a(var39, var33);
                  }
               }

               com.aspose.cells.b.a.a.ze.a(var24, (Object)var33);
            }

            a(var0, var26, var24, var4, var18, var19, var6, var10, var3);
            return var6;
         }
      }
   }

   private static ArrayList c(zn var0, zif var1, zbcp var2, com.aspose.cells.b.a.b.zp var3, float var4, int var5) throws Exception {
      ArrayList var6 = new ArrayList();
      byte var7 = 1;
      zbcr var8 = var1.z();
      int var9 = var8.getCount();
      zbcp var10 = var1.z().a(var5, var7);
      if (var10 == null) {
         return var6;
      } else {
         zbo var11;
         zbo var12;
         ArrayList var13;
         if (var5 == 1) {
            var12 = var1.e();
            var11 = var1.E();
            var13 = zhz.a((List)var1.z().c(), var1.S());
         } else {
            var12 = var1.g();
            var11 = var1.G();
            var13 = zhz.a((List)var1.z().d(), var1.S());
         }

         float var14 = 0.0F;
         if (!var11.p()) {
            var14 = (float)var3.d() + (float)var11.z() / (float)(var11.z() - var11.D()) * (float)var3.f();
         } else {
            var14 = (float)var3.j() - (float)var11.z() / (float)(var11.z() - var11.D()) * (float)var3.f();
         }

         double var15 = var11.D();
         double var17 = var11.z();
         boolean var19 = var10.L();
         zalv var20 = var10.O();
         int var21 = var13.size();
         int var22 = var12.j();
         int var23 = (int)var12.D();
         int var24 = (int)var12.z();
         boolean var25 = false;
         int var60;
         if (!var12.f() && !var1.u()) {
            var60 = zbq.a(var22, var24, var23, var1.S());
            if (var60 == 0) {
               var60 = 1;
            }
         } else {
            var60 = zbq.a(var22, var24, var23, var1.S()) + 1;
         }

         double var26 = (double)var3.e() / (double)var60;
         float var28 = 0.0F;
         ArrayList var29 = new ArrayList();
         List var30 = var8.a(var5, new int[]{var7});
         ArrayList var31 = new ArrayList();
         int var32 = var8.a(var2, var5, new int[]{var7});
         zbcp var33 = null;
         if (var32 > 0) {
            var33 = var8.a(var32 - 1, var5, new int[]{var7});
         }

         if (var33 != null) {
            com.aspose.cells.b.a.a.ze.a(var31, (Object)var33);
         }

         com.aspose.cells.b.a.a.ze.a(var31, (Object)var2);

         for(int var34 = 0; var34 < var31.size(); ++var34) {
            zbcp var35 = (zbcp)var31.get(var34);
            int var36 = var8.a(var35, var5, new int[]{var7});
            int var37 = var35.ai();
            ArrayList var38 = new ArrayList();

            for(int var39 = 0; var39 < var21; ++var39) {
               zjd var40 = var8.c(var37).D().b(var39);
               int var41 = com.aspose.cells.b.a.zo.a(com.aspose.cells.b.a.zr.a(var13.get(var39)));
               var41 = zbq.a(var22, var41, var1.S());
               int var42 = zbq.a(var22, var41, var23, var1.S());
               float var43 = (float)(var26 * (double)var42);
               var28 = (float)(var26 * (double)zbq.a(var22, zbq.a(var12.j(), var12.y(), (int)var12.x(), var41, var1.S()), var41, var1.S()));
               if (var12.f() || var1.u()) {
                  var43 += (float)(var26 / 2.0D);
               }

               float var44 = 0.0F;
               if (var12.p()) {
                  var44 = (float)(var3.c() + var3.e()) - var43;
               } else {
                  var44 = (float)var3.c() + var43;
               }

               if (var40 != null && !var40.a()) {
                  double var61 = var40.v();
                  double var47 = var61;

                  for(int var49 = 0; var49 < var36; ++var49) {
                     zjd var50 = ((zbcp)var30.get(var49)).D().b(var39);
                     if (var50 != null) {
                        double var51 = var50.v();
                        var47 += var51;
                     }
                  }

                  float var62 = (float)(Math.abs(var47) / (var11.z() - var11.D()) * (double)var3.f());
                  if (!var11.p()) {
                     if (var47 <= 0.0D) {
                        var62 += var14;
                     } else {
                        var62 = var14 - var62;
                     }
                  } else if (var47 <= 0.0D) {
                     var62 = var14 - var62;
                  } else {
                     var62 += var14;
                  }

                  com.aspose.cells.b.a.b.zo var63 = new com.aspose.cells.b.a.b.zo(var44, var62);
                  a(var63, var38);
                  if (var35.equals(var2)) {
                     zsp var64 = var2.x();
                     double var52 = 0.0D;
                     double var54 = 0.0D;
                     float var56 = 0.0F;
                     float var57 = 0.0F;
                     if (var64 != null) {
                        switch(var64.g()) {
                        case 0:
                           double var58 = var64.e().size() > var39 ? var64.a(var64.e().get(var39)) : 0.0D;
                           var52 = var58;
                           var58 = var64.f().size() > var39 ? var64.a(var64.f().get(var39)) : 0.0D;
                           var54 = var58;
                           break;
                        case 1:
                           var52 = var64.c();
                           var54 = var52;
                           break;
                        case 2:
                           var52 = var64.c() * var61 / 100.0D;
                           var54 = -var52;
                        }

                        var56 = (float)var52 / (float)(var11.z() - var11.D()) * (float)var3.f();
                        var57 = (float)var54 / (float)(var11.z() - var11.D()) * (float)var3.f();
                     }

                     var64.a(var63, var56, var57);
                  }
               } else {
                  com.aspose.cells.b.a.b.zo var45 = new com.aspose.cells.b.a.b.zo(var44, var4);

                  for(int var46 = var34; var46 > 0; --var46) {
                     if (((ArrayList)((ArrayList)var29.get(var46 - 1))).get(var39) != null) {
                        var45 = (com.aspose.cells.b.a.b.zo)((com.aspose.cells.b.a.b.zo)((ArrayList)((ArrayList)var29.get(var46 - 1))).get(var39));
                        break;
                     }
                  }

                  if (var34 == 0) {
                     var45 = new com.aspose.cells.b.a.b.zo(var44, var4);
                  }

                  a(var45, var38);
               }
            }

            com.aspose.cells.b.a.a.ze.a(var29, (Object)var38);
         }

         a(var0, var31, var29, var4, var19, var20, var6, var12, var3);
         return var6;
      }
   }

   static ArrayList b(zn var0, zif var1, zbcp var2, com.aspose.cells.b.a.b.zp var3, float var4, int var5) throws Exception {
      ArrayList var6 = new ArrayList();
      if (var5 < 2) {
         return var6;
      } else {
         int var7 = var2.af();
         byte var8 = 2;
         zbo var9;
         zbo var10;
         if (var7 == 1) {
            var10 = var1.e();
            var9 = var1.E();
         } else {
            var10 = var1.g();
            var9 = var1.G();
         }

         if (var10.k() == 2) {
            return d(var0, var1, var2, var3, var4, var7);
         } else {
            float var11 = 0.0F;
            if (!var9.p()) {
               var11 = (float)var3.d() + (float)var9.z() / (float)(var9.z() - var9.D()) * (float)var3.f();
            } else {
               var11 = (float)var3.j() - (float)var9.z() / (float)(var9.z() - var9.D()) * (float)var3.f();
            }

            zbcr var12 = var1.z();
            int var13 = var12.getCount();
            double var14 = var9.D();
            double var16 = var9.z();
            boolean var18 = var2.L();
            zalv var19 = var2.O();
            boolean var20 = false;
            int var21 = var5;
            if (var10.p) {
               var21 = (int)var10.z();
            }

            int var56;
            if (!var10.f() && !var1.u()) {
               var56 = var21 - 1;
               if (var56 == 0) {
                  var56 = 1;
               }
            } else {
               var56 = var21;
            }

            double var22 = (double)var3.e() / (double)var56;
            ArrayList var24 = new ArrayList();
            List var25 = var12.a(var7, new int[]{var8});
            ArrayList var26 = new ArrayList();
            int var27 = var12.a(var2, var7, new int[]{var8});
            zbcp var28 = null;
            if (var27 > 0) {
               var28 = var12.a(var27 - 1, var7, new int[]{var8});
            }

            if (var28 != null) {
               com.aspose.cells.b.a.a.ze.a(var26, (Object)var28);
            }

            com.aspose.cells.b.a.a.ze.a(var26, (Object)var2);

            for(int var29 = 0; var29 < var26.size(); ++var29) {
               zbcp var30 = (zbcp)var26.get(var29);
               int var31 = var12.a(var30, var7, new int[]{var8});
               int var32 = var30.ai();
               ArrayList var33 = new ArrayList();
               zjf var34 = var12.c(var32).D();

               for(int var35 = 0; var35 < var5; ++var35) {
                  zjd var36 = var34.b(var35);
                  double var37 = (double)((float)var22 * (float)var35);
                  if (var10.f() || var1.u()) {
                     var37 += (double)((float)(var22 / 2.0D));
                  }

                  if (var10.p()) {
                     var37 = (double)(var3.c() + var3.e()) - var37;
                  } else {
                     var37 += (double)var3.c();
                  }

                  if (var36 != null && !var36.a()) {
                     double var57 = var36.v();
                     double var41 = var57;
                     double var43 = 0.0D;

                     int var45;
                     zjd var46;
                     double var47;
                     for(var45 = 0; var45 < var31; ++var45) {
                        var46 = ((zbcp)var25.get(var45)).D().b(var35);
                        if (var46 != null) {
                           var47 = var46.v();
                           var41 += var47;
                        }
                     }

                     for(var45 = 0; var45 < var25.size(); ++var45) {
                        var46 = ((zbcp)var25.get(var45)).D().b(var35);
                        if (var46 != null) {
                           var47 = var46.v();
                           var43 += Math.abs(var47);
                        }
                     }

                     float var58 = 0.0F;
                     if (var43 != 0.0D) {
                        var58 = (float)Math.abs(var41) * 100.0F / (float)var43 / (float)(var9.z() - var9.D()) * (float)var3.f();
                     }

                     if (!var9.p()) {
                        if (var41 <= 0.0D) {
                           var58 += var11;
                        } else {
                           var58 = var11 - var58;
                        }
                     } else if (var41 <= 0.0D) {
                        var58 = var11 - var58;
                     } else {
                        var58 += var11;
                     }

                     com.aspose.cells.b.a.b.zo var59 = new com.aspose.cells.b.a.b.zo((float)var37, var58);
                     a(var59, var33);
                     if (var30.equals(var2)) {
                        zsp var60 = var2.x();
                        double var48 = 0.0D;
                        double var50 = 0.0D;
                        float var52 = 0.0F;
                        float var53 = 0.0F;
                        if (var60 != null) {
                           switch(var60.g()) {
                           case 0:
                              double var54 = var60.e().size() > var35 ? var60.a(var60.e().get(var35)) : 0.0D;
                              var48 = var54;
                              var54 = var60.f().size() > var35 ? var60.a(var60.f().get(var35)) : 0.0D;
                              var50 = var54;
                              break;
                           case 1:
                              var48 = var60.c();
                              var50 = var48;
                              break;
                           case 2:
                              var48 = var60.c() * var57 / 100.0D;
                              var50 = -var48;
                           }

                           var50 = var50 * 100.0D / var43;
                           var48 = var48 * 100.0D / var43;
                           var52 = (float)var48 / (float)(var9.z() - var9.D()) * (float)var3.f();
                           var53 = (float)var50 / (float)(var9.z() - var9.D()) * (float)var3.f();
                        }

                        var60.a(var59, var52, var53);
                     }
                  } else {
                     com.aspose.cells.b.a.b.zo var39 = new com.aspose.cells.b.a.b.zo((float)var37, var4);

                     for(int var40 = var29; var40 > 0; --var40) {
                        if (((ArrayList)((ArrayList)var24.get(var40 - 1))).get(var35) != null) {
                           var39 = (com.aspose.cells.b.a.b.zo)((com.aspose.cells.b.a.b.zo)((ArrayList)((ArrayList)var24.get(var40 - 1))).get(var35));
                           break;
                        }
                     }

                     if (var29 == 0) {
                        var39 = new com.aspose.cells.b.a.b.zo((float)var37, var4);
                     }

                     a(var39, var33);
                  }
               }

               com.aspose.cells.b.a.a.ze.a(var24, (Object)var33);
            }

            a(var0, var26, var24, var4, var18, var19, var6, var10, var3);
            return var6;
         }
      }
   }

   private static ArrayList d(zn var0, zif var1, zbcp var2, com.aspose.cells.b.a.b.zp var3, float var4, int var5) throws Exception {
      ArrayList var6 = new ArrayList();
      byte var7 = 2;
      zbcr var8 = var1.z();
      int var9 = var8.getCount();
      zbcp var10 = var1.z().a(var5, var7);
      if (var10 == null) {
         return var6;
      } else {
         zbo var11;
         zbo var12;
         ArrayList var13;
         if (var5 == 1) {
            var12 = var1.e();
            var11 = var1.E();
            var13 = zhz.a((List)var1.z().c(), var1.S());
         } else {
            var12 = var1.g();
            var11 = var1.G();
            var13 = zhz.a((List)var1.z().d(), var1.S());
         }

         float var14 = 0.0F;
         if (!var11.p()) {
            var14 = (float)var3.d() + (float)var11.z() / (float)(var11.z() - var11.D()) * (float)var3.f();
         } else {
            var14 = (float)var3.j() - (float)var11.z() / (float)(var11.z() - var11.D()) * (float)var3.f();
         }

         double var15 = var11.D();
         double var17 = var11.z();
         boolean var19 = var10.L();
         zalv var20 = var10.O();
         int var21 = var13.size();
         int var22 = var12.j();
         int var23 = (int)var12.D();
         int var24 = (int)var12.z();
         boolean var25 = false;
         int var62;
         if (!var12.f() && !var1.u()) {
            var62 = zbq.a(var22, var24, var23, var1.S());
            if (var62 == 0) {
               var62 = 1;
            }
         } else {
            var62 = zbq.a(var22, var24, var23, var1.S()) + 1;
         }

         double var26 = (double)var3.e() / (double)var62;
         float var28 = 0.0F;
         ArrayList var29 = new ArrayList();
         List var30 = var8.a(var5, new int[]{var7});
         ArrayList var31 = new ArrayList();
         int var32 = var8.a(var2, var5, new int[]{var7});
         zbcp var33 = null;
         if (var32 > 0) {
            var33 = var8.a(var32 - 1, var5, new int[]{var7});
         }

         if (var33 != null) {
            com.aspose.cells.b.a.a.ze.a(var31, (Object)var33);
         }

         com.aspose.cells.b.a.a.ze.a(var31, (Object)var2);

         for(int var34 = 0; var34 < var31.size(); ++var34) {
            zbcp var35 = (zbcp)var31.get(var34);
            int var36 = var8.a(var35, var5, new int[]{var7});
            int var37 = var35.ai();
            ArrayList var38 = new ArrayList();

            for(int var39 = 0; var39 < var21; ++var39) {
               zjd var40 = var8.c(var37).D().b(var39);
               int var41 = com.aspose.cells.b.a.zo.a(com.aspose.cells.b.a.zr.a(var13.get(var39)));
               var41 = zbq.a(var22, var41, var1.S());
               int var42 = zbq.a(var22, var41, var23, var1.S());
               float var43 = (float)(var26 * (double)var42);
               var28 = (float)(var26 * (double)zbq.a(var22, zbq.a(var12.j(), var12.y(), (int)var12.x(), var41, var1.S()), var41, var1.S()));
               if (var12.f() || var1.u()) {
                  var43 += (float)(var26 / 2.0D);
               }

               float var44 = 0.0F;
               if (var12.p()) {
                  var44 = (float)(var3.c() + var3.e()) - var43;
               } else {
                  var44 = (float)var3.c() + var43;
               }

               if (var40 != null && !var40.a()) {
                  double var63 = var40.v();
                  double var47 = var63;
                  double var49 = 0.0D;

                  int var51;
                  zjd var52;
                  double var53;
                  for(var51 = 0; var51 < var36; ++var51) {
                     var52 = ((zbcp)var30.get(var51)).D().b(var39);
                     if (var52 != null) {
                        var53 = var52.v();
                        var47 += var53;
                     }
                  }

                  for(var51 = 0; var51 < var30.size(); ++var51) {
                     var52 = ((zbcp)var30.get(var51)).D().b(var39);
                     if (var52 != null) {
                        var53 = var52.v();
                        var49 += Math.abs(var53);
                     }
                  }

                  float var64 = 0.0F;
                  if (var49 != 0.0D) {
                     var64 = (float)Math.abs(var47) * 100.0F / (float)var49 / (float)(var11.z() - var11.D()) * (float)var3.f();
                  }

                  if (!var11.p()) {
                     if (var47 <= 0.0D) {
                        var64 += var14;
                     } else {
                        var64 = var14 - var64;
                     }
                  } else if (var47 <= 0.0D) {
                     var64 = var14 - var64;
                  } else {
                     var64 += var14;
                  }

                  com.aspose.cells.b.a.b.zo var65 = new com.aspose.cells.b.a.b.zo(var44, var64);
                  a(var65, var38);
                  if (var35.equals(var2)) {
                     zsp var66 = var2.x();
                     double var54 = 0.0D;
                     double var56 = 0.0D;
                     float var58 = 0.0F;
                     float var59 = 0.0F;
                     if (var66 != null) {
                        switch(var66.g()) {
                        case 0:
                           double var60 = var66.e().size() > var39 ? var66.a(var66.e().get(var39)) : 0.0D;
                           var54 = var60;
                           var60 = var66.f().size() > var39 ? var66.a(var66.f().get(var39)) : 0.0D;
                           var56 = var60;
                           break;
                        case 1:
                           var54 = var66.c();
                           var56 = var54;
                           break;
                        case 2:
                           var54 = var66.c() * var63 / 100.0D;
                           var56 = -var54;
                        }

                        var56 = var56 * 100.0D / var49;
                        var54 = var54 * 100.0D / var49;
                        var58 = (float)var54 / (float)(var11.z() - var11.D()) * (float)var3.f();
                        var59 = (float)var56 / (float)(var11.z() - var11.D()) * (float)var3.f();
                     }

                     var66.a(var65, var58, var59);
                  }
               } else {
                  com.aspose.cells.b.a.b.zo var45 = new com.aspose.cells.b.a.b.zo(var44, var4);

                  for(int var46 = var34; var46 > 0; --var46) {
                     if (((ArrayList)((ArrayList)var29.get(var46 - 1))).get(var39) != null) {
                        var45 = (com.aspose.cells.b.a.b.zo)((com.aspose.cells.b.a.b.zo)((ArrayList)((ArrayList)var29.get(var46 - 1))).get(var39));
                        break;
                     }
                  }

                  if (var34 == 0) {
                     var45 = new com.aspose.cells.b.a.b.zo(var44, var4);
                  }

                  a(var45, var38);
               }
            }

            com.aspose.cells.b.a.a.ze.a(var29, (Object)var38);
         }

         a(var0, var31, var29, var4, var19, var20, var6, var12, var3);
         return var6;
      }
   }

   private static void a(com.aspose.cells.b.a.b.zo var0, List var1) {
      if (var1.size() == 0) {
         var1.add(var0);
      } else {
         int var2;
         for(var2 = 0; var2 < var1.size(); ++var2) {
            if (var1.get(var2) != null) {
               com.aspose.cells.b.a.b.zo var3 = (com.aspose.cells.b.a.b.zo)var1.get(var2);
               if (var0.d() < var3.d()) {
                  var1.add(var2, var0);
                  break;
               }
            }
         }

         if (var2 == var1.size()) {
            var1.add(var0);
         }
      }

   }

   static com.aspose.cells.b.a.b.zq a(com.aspose.cells.b.a.b.zo[] var0) {
      float var1 = 0.0F;
      float var2 = 0.0F;
      float var3 = 0.0F;
      float var4 = 0.0F;
      if (var0.length > 0) {
         var1 = var0[0].d();
         var2 = var0[0].d();
         var3 = var0[0].e();
         var4 = var0[0].e();
      }

      for(int var5 = 1; var5 < var0.length; ++var5) {
         com.aspose.cells.b.a.b.zo var6 = var0[var5];
         if (var6.d() < var1) {
            var1 = var6.d();
         }

         if (var6.d() > var2) {
            var2 = var6.d();
         }

         if (var6.e() < var3) {
            var3 = var6.e();
         }

         if (var6.e() > var4) {
            var4 = var6.e();
         }
      }

      return new com.aspose.cells.b.a.b.zq(var1, var3, var2 - var1, var4 - var3);
   }

   private static void a(zn var0, zbcp var1, List var2, ArrayList var3, float var4, boolean var5, zalv var6, ArrayList var7, zbo var8, com.aspose.cells.b.a.b.zp var9, int var10) {
      for(int var11 = 0; var11 < var2.size(); ++var11) {
         com.aspose.cells.b.a.b.zo var12 = (com.aspose.cells.b.a.b.zo)var2.get(var11);
         zjd var13 = var1.D().b(var11);
         if (var13 != null) {
            var13.a(new com.aspose.cells.b.a.b.zq(var12.d(), var12.e(), 0.0F, 0.0F));
            com.aspose.cells.b.a.a.ze.a(var13.b, (Object)(new com.aspose.cells.b.a.b.zo(var12.d(), var12.e())));
            com.aspose.cells.b.a.a.ze.a(var13.d, (Object)(new com.aspose.cells.b.a.b.zo(var12.d(), var4)));
         }
      }

      if (var2.size() >= 2) {
         com.aspose.cells.b.a.b.zp var23 = new com.aspose.cells.b.a.b.zp(var9.c(), var9.d() + 1, var9.e() + 2, var9.f());
         com.aspose.cells.b.a.b.a.zf var24 = var0.e();
         com.aspose.cells.b.a.b.zq var25 = var0.f();
         var0.a(var23);
         com.aspose.cells.b.a.b.zo var15;
         com.aspose.cells.b.a.b.zo var29;
         if (!var1.aA()) {
            for(int var14 = 0; var14 < var2.size(); ++var14) {
               var15 = (com.aspose.cells.b.a.b.zo)var2.get(var14);
               if (!a(var14, var3) && var1.k().a(var14) != null) {
                  Object[] var16 = new Object[]{var1.ai(), var14, new com.aspose.cells.b.a.b.zo(var15.d(), (var15.e() + var4) / 2.0F), var8};
                  com.aspose.cells.b.a.a.ze.a(var7, (Object)var16);
               }
            }
         } else {
            com.aspose.cells.b.a.b.zo var26 = com.aspose.cells.b.a.b.zo.a();
            if (var2.size() % 2 == 0) {
               var15 = (com.aspose.cells.b.a.b.zo)var2.get(var2.size() / 2);
               var29 = (com.aspose.cells.b.a.b.zo)var2.get(var2.size() / 2 - 1);
               var26.a((var15.d() + var29.d()) / 2.0F);
               var26.b(((var15.e() + var4) / 2.0F + (var29.e() + var4) / 2.0F) / 2.0F);
            } else {
               var15 = (com.aspose.cells.b.a.b.zo)var2.get(var2.size() / 2);
               var26 = new com.aspose.cells.b.a.b.zo(var15.d(), (var15.e() + var4) / 2.0F);
            }

            if (var1.k().a(0) != null) {
               Object[] var28 = new Object[]{var1.ai(), 0, var26, var8};
               com.aspose.cells.b.a.a.ze.a(var7, (Object)var28);
            }
         }

         ArrayList var27 = new ArrayList();

         int var30;
         for(var30 = 0; var30 < var2.size(); ++var30) {
            var29 = (com.aspose.cells.b.a.b.zo)var2.get(var30);
            if (!a(var30, var3) && var30 != var2.size() - 1) {
               com.aspose.cells.b.a.a.ze.a(var27, (Object)var29);
            } else {
               if (!a(var30, var3) && var30 == var2.size() - 1) {
                  com.aspose.cells.b.a.a.ze.a(var27, (Object)var29);
               }

               if (var27.size() > 1) {
                  com.aspose.cells.b.a.b.zo[] var17 = new com.aspose.cells.b.a.b.zo[2 * var27.size()];
                  zbuk.a(var17);

                  for(int var18 = 0; var18 < var27.size(); ++var18) {
                     com.aspose.cells.b.a.b.zo var19 = (com.aspose.cells.b.a.b.zo)var27.get(var18);
                     var17[var18] = var19;
                     var17[var17.length - 1 - var18] = new com.aspose.cells.b.a.b.zo(var19.d(), var4);
                  }

                  com.aspose.cells.b.a.b.zq var31 = a(var17);
                  com.aspose.cells.b.a.b.zc var32 = zax.a(var1.A(), var31);

                  try {
                     var0.a(var32, var17);
                     var0.c(zama.a(var1.z()), var17);
                  } finally {
                     if (var32 != null) {
                        var32.f();
                     }

                  }

                  com.aspose.cells.b.a.b.zo var20 = var17[0];
                  zama.a(var0, var20.d(), var20.e(), var20.d(), var4, var1.z());
               }

               var27 = new ArrayList();
            }
         }

         if (var5) {
            for(var30 = 1; var30 < var2.size() - 1; ++var30) {
               var29 = (com.aspose.cells.b.a.b.zo)var2.get(var30);
               if (!a(var30, var3)) {
                  zama.a(var0, var29.d(), var29.e(), var29.d(), var4, var6);
               }
            }
         }

         var0.a(var24);
      }
   }

   private static boolean a(int var0, ArrayList var1) {
      for(int var2 = 0; var2 < var1.size(); ++var2) {
         if ((Integer)var1.get(var2) == var0) {
            return true;
         }
      }

      return false;
   }

   private static void a(zn var0, List var1, List var2, float var3, boolean var4, zalv var5, ArrayList var6, zbo var7, com.aspose.cells.b.a.b.zp var8) {
      int var12;
      for(int var9 = var2.size() - 1; var9 < var2.size(); ++var9) {
         ArrayList var10 = (ArrayList)var2.get(var9);
         zbcp var11 = (zbcp)var1.get(var9);

         for(var12 = 0; var12 < var10.size(); ++var12) {
            com.aspose.cells.b.a.b.zo var13 = (com.aspose.cells.b.a.b.zo)var10.get(var12);
            zjd var14 = var11.D().b(var12);
            if (var14 != null) {
               var14.a(new com.aspose.cells.b.a.b.zq(var13.d(), var13.e(), 0.0F, 0.0F));
               com.aspose.cells.b.a.a.ze.a(var14.b, (Object)(new com.aspose.cells.b.a.b.zo(var13.d(), var13.e())));
               com.aspose.cells.b.a.a.ze.a(var14.d, (Object)(new com.aspose.cells.b.a.b.zo(var13.d(), var3)));
            }
         }
      }

      com.aspose.cells.b.a.b.zp var26 = new com.aspose.cells.b.a.b.zp(var8.c(), var8.d() + 1, var8.e(), var8.f() + 1);
      com.aspose.cells.b.a.b.a.zf var27 = var0.e();
      com.aspose.cells.b.a.b.zq var28 = var0.f();
      var0.a(var26);

      ArrayList var29;
      for(var12 = var2.size() - 1; var12 < var2.size(); ++var12) {
         var29 = (ArrayList)var2.get(var12);
         zbcp var30 = (zbcp)var1.get(var12);
         ArrayList var15 = null;
         if (var12 > 0) {
            var15 = (ArrayList)var2.get(var12 - 1);
         }

         if (var29.size() >= 2) {
            com.aspose.cells.b.a.b.zo var16 = (com.aspose.cells.b.a.b.zo)var29.get(0);
            zama.a(var0, var16.d(), var16.e(), var16.d(), var3, var30.z());
            com.aspose.cells.b.a.b.zo[] var17 = new com.aspose.cells.b.a.b.zo[2 * var29.size()];
            zbuk.a(var17);

            int var18;
            com.aspose.cells.b.a.b.zo var19;
            for(var18 = 0; var18 < var29.size(); ++var18) {
               var19 = (com.aspose.cells.b.a.b.zo)var29.get(var18);
               var17[var18] = var19;
               if (var15 == null) {
                  var17[var17.length - 1 - var18] = new com.aspose.cells.b.a.b.zo(var19.d(), var3);
               } else {
                  var17[var17.length - 1 - var18] = (com.aspose.cells.b.a.b.zo)var15.get(var18);
               }
            }

            if (!var30.aA()) {
               for(var18 = 0; var18 < var29.size(); ++var18) {
                  if (var30.k().a(var18) != null) {
                     var19 = (com.aspose.cells.b.a.b.zo)var29.get(var18);
                     Object[] var37 = new Object[]{var30.ai(), var18, new com.aspose.cells.b.a.b.zo(var19.d(), (var19.e() + var17[var17.length - 1 - var18].e()) / 2.0F), var7};
                     com.aspose.cells.b.a.a.ze.a(var6, (Object)var37);
                  }
               }
            } else {
               com.aspose.cells.b.a.b.zo var33 = com.aspose.cells.b.a.b.zo.a();
               com.aspose.cells.b.a.b.zo var20;
               if (var29.size() % 2 == 0) {
                  var19 = (com.aspose.cells.b.a.b.zo)var29.get(var29.size() / 2);
                  var20 = (com.aspose.cells.b.a.b.zo)var29.get(var29.size() / 2 - 1);
                  if (var15 == null) {
                     var33.a((var19.d() + var20.d()) / 2.0F);
                     var33.b(((var19.e() + var3) / 2.0F + (var20.e() + var3) / 2.0F) / 2.0F);
                  } else {
                     com.aspose.cells.b.a.b.zo var21 = (com.aspose.cells.b.a.b.zo)var15.get(var29.size() / 2);
                     com.aspose.cells.b.a.b.zo var22 = (com.aspose.cells.b.a.b.zo)var15.get(var29.size() / 2 - 1);
                     var33.a((var19.d() + var20.d()) / 2.0F);
                     var33.b(((var19.e() + var21.e()) / 2.0F + (var20.e() + var22.e()) / 2.0F) / 2.0F);
                  }
               } else {
                  var19 = (com.aspose.cells.b.a.b.zo)var29.get(var29.size() / 2);
                  if (var15 == null) {
                     var33 = new com.aspose.cells.b.a.b.zo(var19.d(), (var19.e() + var3) / 2.0F);
                  } else {
                     var20 = (com.aspose.cells.b.a.b.zo)var15.get(var29.size() / 2);
                     var33 = new com.aspose.cells.b.a.b.zo(var19.d(), (var19.e() + var20.e()) / 2.0F);
                  }
               }

               if (var30.k().a(0) != null) {
                  Object[] var34 = new Object[]{var30.ai(), 0, var33, var7};
                  com.aspose.cells.b.a.a.ze.a(var6, (Object)var34);
               }
            }

            com.aspose.cells.b.a.b.zq var35 = a(var17);
            com.aspose.cells.b.a.b.zc var36 = zax.a(var30.A(), var35);

            try {
               var0.a(var36, var17);
            } finally {
               if (var36 != null) {
                  var36.f();
               }

            }

            var0.c(zama.a(var30.z()), var17);
         }
      }

      if (var4) {
         for(var12 = 0; var12 < var2.size(); ++var12) {
            var29 = (ArrayList)var2.get(var12);

            for(int var31 = 1; var31 < var29.size() - 1; ++var31) {
               com.aspose.cells.b.a.b.zo var32 = (com.aspose.cells.b.a.b.zo)var29.get(var31);
               zama.a(var0, var32.d(), var32.e(), var32.d(), var3, var5);
            }
         }
      }

      var0.a(var27);
   }

   static void a(zn var0, zif var1, float var2, double var3, int var5) throws Exception {
      if (var5 >= 2) {
         zbcr var6 = var1.z();
         int var7 = var6.getCount();
         zbo var8 = var1.E();
         zbo var9 = var1.e();
         if (var9.k() == 2) {
            a(var0, var1, var2, var3);
         } else {
            float var10 = (float)var1.m() / 100.0F;
            float var11 = (float)var1.n() / 100.0F;
            ArrayList var12 = new ArrayList();
            boolean var13 = false;
            boolean var14 = var9.f() || var1.u();
            int var44;
            if (var14) {
               var44 = var5;
            } else {
               var44 = var5 - 1;
               if (var44 == 0) {
                  var44 = 1;
               }
            }

            float var15 = var1.N().g() / (float)var44;
            float var16 = var15 * var10 / (1.0F + var11);
            ArrayList var17 = new ArrayList();
            ArrayList var18 = var6.j();
            int var19;
            int var20;
            zbcp var21;
            int var22;
            zjf var23;
            zjd var24;
            ArrayList var25;
            int var26;
            int var27;
            float var28;
            int var29;
            zjd var30;
            double var31;
            float var33;
            com.aspose.cells.b.a.b.zo[] var34;
            com.aspose.cells.b.a.b.zo[] var35;
            float var36;
            double var37;
            zjd var39;
            zjd var40;
            com.aspose.cells.b.a.b.zo[] var41;
            com.aspose.cells.b.a.b.zo var42;
            Object[] var43;
            com.aspose.cells.b.a.b.zo var45;
            Object[] var46;
            float var47;
            com.aspose.cells.b.a.b.zo[] var48;
            if ((var1.D() < 0 || var1.D() >= 90) && (var1.D() < 180 || var1.D() >= 270)) {
               if (var1.D() >= 90 && var1.D() < 180 || var1.D() >= 270 && var1.D() < 360) {
                  for(var19 = 0; var19 < var18.size(); ++var19) {
                     var20 = var19;
                     if (var1.D() >= 270 && var1.D() < 360) {
                        var20 = var18.size() - 1 - var19;
                     }

                     if (var1.I().p()) {
                        var20 = var18.size() - 1 - var20;
                     }

                     var21 = (zbcp)var18.get(var20);
                     var22 = var21.ai();
                     var23 = var21.D();
                     var24 = null;
                     var25 = new ArrayList();

                     for(var26 = 0; var26 < var5; ++var26) {
                        var27 = var26;
                        if (var1.D() >= 270 && var1.D() < 360) {
                           var27 = var5 - 1 - var26;
                        }

                        var28 = var15 * (float)var27;
                        var28 += var1.N().e();
                        if (var14) {
                           var28 += var15 / 2.0F;
                        }

                        var29 = var27;
                        if (var9.p()) {
                           var29 = var5 - 1 - var27;
                        }

                        var30 = var23.b(var29);
                        com.aspose.cells.b.a.a.ze.a(var25, (Object)var30);
                        var31 = var30.v();
                        if (var30 != null && !var30.a()) {
                           var31 = var30.v();
                           var24 = var30;
                        }

                        var33 = (float)((var3 - var31) / (var8.z() - var8.D()) * (double)var1.N().i());
                        if (var8.p()) {
                           var33 = -var33;
                        }

                        var34 = zkq.a(var0, var1, var2, 0.0F, var28, var16, var22 + 1, var18.size());
                        com.aspose.cells.b.a.a.ze.a(var17, (Object)var34);
                        var35 = zkq.a(var0, var1, var2, var33, var28, var16, var22 + 1, var18.size());
                        com.aspose.cells.b.a.a.ze.a(var17, (Object)var35);
                        if (var30 != null && !var30.a()) {
                           if (!var21.aA()) {
                              var45 = new com.aspose.cells.b.a.b.zo(0.0F, 0.0F);
                              if (var1.D() >= 90 && var1.D() < 270) {
                                 var45.a((var34[1].d() + var35[1].d()) / 2.0F);
                                 var45.b((var34[1].e() + var35[1].e()) / 2.0F);
                              } else {
                                 var45.a((var34[0].d() + var35[0].d()) / 2.0F);
                                 var45.b((var34[0].e() + var35[0].e()) / 2.0F);
                              }

                              var46 = new Object[]{var22, var29, var45};
                              com.aspose.cells.b.a.a.ze.a(var12, (Object)var46);
                           } else if (var29 == 0) {
                              var36 = var1.N().g() / 2.0F;
                              var36 += var1.N().e();
                              var37 = 0.0D;
                              if (var5 % 2 == 0) {
                                 var39 = var23.b(var5 / 2);
                                 var40 = var23.b(var5 / 2 - 1);
                                 var37 = (var39.v() + var40.v()) / 2.0D;
                              } else {
                                 var39 = var23.b(var5 / 2);
                                 var37 = var39.v();
                              }

                              var47 = (float)(var3 - var37) / (float)(var8.z() - var8.D()) * var1.N().i();
                              if (var8.p()) {
                                 var47 = -var47;
                              }

                              var48 = zkq.a(var0, var1, var2, 0.0F, var36, var16, var22 + 1, var18.size());
                              var41 = zkq.a(var0, var1, var2, var47, var36, var16, var22 + 1, var18.size());
                              var42 = new com.aspose.cells.b.a.b.zo(0.0F, 0.0F);
                              if (var1.D() >= 90 && var1.D() < 270) {
                                 var42.a((var48[1].d() + var41[1].d()) / 2.0F);
                                 var42.b((var48[1].e() + var41[1].e()) / 2.0F);
                              } else {
                                 var42.a((var48[0].d() + var41[0].d()) / 2.0F);
                                 var42.b((var48[0].e() + var41[0].e()) / 2.0F);
                              }

                              var43 = new Object[]{var22, var29, var42};
                              com.aspose.cells.b.a.a.ze.a(var12, (Object)var43);
                           }
                        }
                     }

                     a(var0, var1, (zbcp)var21, (zjd)var24, var17, (ArrayList)var25);
                     var25.clear();
                     var17.clear();
                     zkq.c(var0, var1, var12);
                     var12.clear();
                  }
               }
            } else {
               for(var19 = 0; var19 < var18.size(); ++var19) {
                  var20 = var18.size() - 1 - var19;
                  if (var1.D() >= 180 && var1.D() < 270) {
                     var20 = var18.size() - 1 - var20;
                  }

                  if (var1.I().p()) {
                     var20 = var18.size() - 1 - var20;
                  }

                  var21 = (zbcp)var18.get(var20);
                  var22 = var21.ai();
                  var23 = var21.D();
                  var24 = null;
                  var25 = new ArrayList();

                  for(var26 = 0; var26 < var5; ++var26) {
                     var27 = var26;
                     if (var1.D() >= 180 && var1.D() < 270) {
                        var27 = var5 - 1 - var26;
                     }

                     var28 = var15 * (float)var27;
                     var28 += var1.N().e();
                     if (var14) {
                        var28 += var15 / 2.0F;
                     }

                     var29 = var27;
                     if (var9.p()) {
                        var29 = var5 - 1 - var27;
                     }

                     var30 = var23.b(var29);
                     com.aspose.cells.b.a.a.ze.a(var25, (Object)var30);
                     var31 = 0.0D;
                     if (var30 != null && !var30.a()) {
                        var31 = var30.v();
                        var24 = var30;
                     }

                     var33 = (float)((var3 - var31) / (var8.z() - var8.D()) * (double)var1.N().i());
                     if (var8.p()) {
                        var33 = -var33;
                     }

                     var34 = zkq.a(var0, var1, var2, 0.0F, var28, var16, var22 + 1, var18.size());
                     com.aspose.cells.b.a.a.ze.a(var17, (Object)var34);
                     var35 = zkq.a(var0, var1, var2, var33, var28, var16, var22 + 1, var18.size());
                     com.aspose.cells.b.a.a.ze.a(var17, (Object)var35);
                     if (var30 != null && !var30.a()) {
                        if (!var21.aA()) {
                           var45 = new com.aspose.cells.b.a.b.zo(0.0F, 0.0F);
                           if (var1.D() >= 90 && var1.D() < 270) {
                              var45.a((var34[1].d() + var35[1].d()) / 2.0F);
                              var45.b((var34[1].e() + var35[1].e()) / 2.0F);
                           } else {
                              var45.a((var34[0].d() + var35[0].d()) / 2.0F);
                              var45.b((var34[0].e() + var35[0].e()) / 2.0F);
                           }

                           var46 = new Object[]{var22, var29, var45};
                           com.aspose.cells.b.a.a.ze.a(var12, (Object)var46);
                        } else if (var29 == 0) {
                           var36 = var1.N().g() / 2.0F;
                           var36 += var1.N().e();
                           var37 = 0.0D;
                           if (var5 % 2 == 0) {
                              var39 = var23.b(var5 / 2);
                              var40 = var23.b(var5 / 2 - 1);
                              var37 = (var39.v() + var40.v()) / 2.0D;
                           } else {
                              var39 = var23.b(var5 / 2);
                              var37 = var39.v();
                           }

                           var47 = (float)(var3 - var37) / (float)(var8.z() - var8.D()) * var1.N().i();
                           if (var8.p()) {
                              var47 = -var47;
                           }

                           var48 = zkq.a(var0, var1, var2, 0.0F, var36, var16, var22 + 1, var18.size());
                           var41 = zkq.a(var0, var1, var2, var47, var36, var16, var22 + 1, var18.size());
                           var42 = new com.aspose.cells.b.a.b.zo(0.0F, 0.0F);
                           if (var1.D() >= 90 && var1.D() < 270) {
                              var42.a((var48[1].d() + var41[1].d()) / 2.0F);
                              var42.b((var48[1].e() + var41[1].e()) / 2.0F);
                           } else {
                              var42.a((var48[0].d() + var41[0].d()) / 2.0F);
                              var42.b((var48[0].e() + var41[0].e()) / 2.0F);
                           }

                           var43 = new Object[]{var22, var29, var42};
                           com.aspose.cells.b.a.a.ze.a(var12, (Object)var43);
                        }
                     }
                  }

                  a(var0, var1, (zbcp)var21, (zjd)var24, var17, (ArrayList)var25);
                  var25.clear();
                  var17.clear();
                  zkq.c(var0, var1, var12);
                  var12.clear();
               }
            }

         }
      }
   }

   private static void a(zn var0, zif var1, float var2, double var3) throws Exception {
      zbcr var5 = var1.z();
      int var6 = var5.getCount();
      zbo var7 = var1.E();
      zbo var8 = var1.e();
      float var9 = (float)var1.m() / 100.0F;
      float var10 = (float)var1.n() / 100.0F;
      ArrayList var11 = new ArrayList();
      int var12 = var8.j();
      int var13 = (int)var8.D();
      int var14 = (int)var8.z();
      boolean var15 = false;
      boolean var16 = var8.f() || var1.u();
      int var51;
      if (var16) {
         var51 = zbq.a(var12, var14, var13, var1.S()) + 1;
      } else {
         var51 = zbq.a(var12, var14, var13, var1.S());
         if (var51 == 0) {
            var51 = 1;
         }
      }

      float var17 = var1.N().g() / (float)var51;
      float var18 = var17 * var9 / (1.0F + var10);
      ArrayList var19 = new ArrayList();
      ArrayList var20 = var5.j();
      ArrayList var21 = zhz.a((List)var1.z().c(), var1.S());
      int var22 = var21.size();
      int var23;
      int var24;
      zbcp var25;
      int var26;
      zjf var27;
      zjd var28;
      ArrayList var29;
      int var30;
      int var31;
      int var32;
      int var33;
      float var34;
      float var35;
      int var36;
      zjd var37;
      double var38;
      float var40;
      com.aspose.cells.b.a.b.zo[] var41;
      com.aspose.cells.b.a.b.zo[] var42;
      float var43;
      double var44;
      zjd var46;
      zjd var47;
      com.aspose.cells.b.a.b.zo[] var48;
      com.aspose.cells.b.a.b.zo var49;
      Object[] var50;
      com.aspose.cells.b.a.b.zo var52;
      Object[] var53;
      float var54;
      com.aspose.cells.b.a.b.zo[] var55;
      if ((var1.D() < 0 || var1.D() >= 90) && (var1.D() < 180 || var1.D() >= 270)) {
         if (var1.D() >= 90 && var1.D() < 180 || var1.D() >= 270 && var1.D() < 360) {
            for(var23 = 0; var23 < var20.size(); ++var23) {
               var24 = var23;
               if (var1.D() >= 270 && var1.D() < 360) {
                  var24 = var20.size() - 1 - var23;
               }

               if (var1.I().p()) {
                  var24 = var20.size() - 1 - var24;
               }

               var25 = (zbcp)var20.get(var24);
               var26 = var25.ai();
               var27 = var25.D();
               var28 = null;
               var29 = new ArrayList();

               for(var30 = 0; var30 < var22; ++var30) {
                  var31 = var30;
                  if (var1.D() >= 270 && var1.D() < 360) {
                     var31 = var22 - 1 - var30;
                  }

                  var32 = com.aspose.cells.b.a.zo.a(com.aspose.cells.b.a.zr.a(var21.get(var31)));
                  var32 = zbq.a(var12, var32, var1.S());
                  var33 = zbq.a(var12, var32, (int)var8.D(), var1.S());
                  var34 = var17 * (float)var33;
                  var35 = var1.N().e() + var34;
                  if (var16) {
                     var35 += var17 / 2.0F;
                  }

                  var36 = var31;
                  if (var8.p()) {
                     var36 = var22 - 1 - var31;
                  }

                  var37 = var27.b(var36);
                  com.aspose.cells.b.a.a.ze.a(var29, (Object)var37);
                  var38 = var37.v();
                  if (var37 != null && !var37.a()) {
                     var38 = var37.v();
                     var28 = var37;
                  }

                  var40 = (float)((var3 - var38) / (var7.z() - var7.D()) * (double)var1.N().i());
                  if (var7.p()) {
                     var40 = -var40;
                  }

                  var41 = zkq.a(var0, var1, var2, 0.0F, var35, var18, var26 + 1, var20.size());
                  com.aspose.cells.b.a.a.ze.a(var19, (Object)var41);
                  var42 = zkq.a(var0, var1, var2, var40, var35, var18, var26 + 1, var20.size());
                  com.aspose.cells.b.a.a.ze.a(var19, (Object)var42);
                  if (var37 != null && !var37.a()) {
                     if (!var25.aA()) {
                        var52 = new com.aspose.cells.b.a.b.zo(0.0F, 0.0F);
                        if (var1.D() >= 90 && var1.D() < 270) {
                           var52.a((var41[1].d() + var42[1].d()) / 2.0F);
                           var52.b((var41[1].e() + var42[1].e()) / 2.0F);
                        } else {
                           var52.a((var41[0].d() + var42[0].d()) / 2.0F);
                           var52.b((var41[0].e() + var42[0].e()) / 2.0F);
                        }

                        var53 = new Object[]{var26, var36, var52};
                        com.aspose.cells.b.a.a.ze.a(var11, (Object)var53);
                     } else if (var36 == 0) {
                        var43 = var1.N().g() / 2.0F;
                        var43 += var1.N().e();
                        var44 = 0.0D;
                        if (var22 % 2 == 0) {
                           var46 = var27.b(var22 / 2);
                           var47 = var27.b(var22 / 2 - 1);
                           var44 = (var46.v() + var47.v()) / 2.0D;
                        } else {
                           var46 = var27.b(var22 / 2);
                           var44 = var46.v();
                        }

                        var54 = (float)(var3 - var44) / (float)(var7.z() - var7.D()) * var1.N().i();
                        if (var7.p()) {
                           var54 = -var54;
                        }

                        var55 = zkq.a(var0, var1, var2, 0.0F, var43, var18, var26 + 1, var20.size());
                        var48 = zkq.a(var0, var1, var2, var54, var43, var18, var26 + 1, var20.size());
                        var49 = new com.aspose.cells.b.a.b.zo(0.0F, 0.0F);
                        if (var1.D() >= 90 && var1.D() < 270) {
                           var49.a((var55[1].d() + var48[1].d()) / 2.0F);
                           var49.b((var55[1].e() + var48[1].e()) / 2.0F);
                        } else {
                           var49.a((var55[0].d() + var48[0].d()) / 2.0F);
                           var49.b((var55[0].e() + var48[0].e()) / 2.0F);
                        }

                        var50 = new Object[]{var26, var36, var49};
                        com.aspose.cells.b.a.a.ze.a(var11, (Object)var50);
                     }
                  }
               }

               a(var0, var1, (zbcp)var25, (zjd)var28, var19, (ArrayList)var29);
               var29.clear();
               var19.clear();
               zkq.c(var0, var1, var11);
               var11.clear();
            }
         }
      } else {
         for(var23 = 0; var23 < var20.size(); ++var23) {
            var24 = var20.size() - 1 - var23;
            if (var1.D() >= 180 && var1.D() < 270) {
               var24 = var20.size() - 1 - var24;
            }

            if (var1.I().p()) {
               var24 = var20.size() - 1 - var24;
            }

            var25 = (zbcp)var20.get(var24);
            var26 = var25.ai();
            var27 = var25.D();
            var28 = null;
            var29 = new ArrayList();

            for(var30 = 0; var30 < var22; ++var30) {
               var31 = var30;
               if (var1.D() >= 180 && var1.D() < 270) {
                  var31 = var22 - 1 - var30;
               }

               var32 = com.aspose.cells.b.a.zo.a(com.aspose.cells.b.a.zr.a(var21.get(var31)));
               var32 = zbq.a(var12, var32, var1.S());
               var33 = zbq.a(var12, var32, (int)var8.D(), var1.S());
               var34 = var17 * (float)var33;
               var35 = var1.N().e() + var34;
               if (var16) {
                  var35 += var17 / 2.0F;
               }

               var36 = var31;
               if (var8.p()) {
                  var36 = var22 - 1 - var31;
               }

               var37 = var27.b(var36);
               com.aspose.cells.b.a.a.ze.a(var29, (Object)var37);
               var38 = 0.0D;
               if (var37 != null && !var37.a()) {
                  var38 = var37.v();
                  var28 = var37;
               }

               var40 = (float)((var3 - var38) / (var7.z() - var7.D()) * (double)var1.N().i());
               if (var7.p()) {
                  var40 = -var40;
               }

               var41 = zkq.a(var0, var1, var2, 0.0F, var35, var18, var26 + 1, var20.size());
               com.aspose.cells.b.a.a.ze.a(var19, (Object)var41);
               var42 = zkq.a(var0, var1, var2, var40, var35, var18, var26 + 1, var20.size());
               com.aspose.cells.b.a.a.ze.a(var19, (Object)var42);
               if (var37 != null && !var37.a()) {
                  if (!var25.aA()) {
                     var52 = new com.aspose.cells.b.a.b.zo(0.0F, 0.0F);
                     if (var1.D() >= 90 && var1.D() < 270) {
                        var52.a((var41[1].d() + var42[1].d()) / 2.0F);
                        var52.b((var41[1].e() + var42[1].e()) / 2.0F);
                     } else {
                        var52.a((var41[0].d() + var42[0].d()) / 2.0F);
                        var52.b((var41[0].e() + var42[0].e()) / 2.0F);
                     }

                     var53 = new Object[]{var26, var36, var52};
                     com.aspose.cells.b.a.a.ze.a(var11, (Object)var53);
                  } else if (var36 == 0) {
                     var43 = var1.N().g() / 2.0F;
                     var43 += var1.N().e();
                     var44 = 0.0D;
                     if (var22 % 2 == 0) {
                        var46 = var27.b(var22 / 2);
                        var47 = var27.b(var22 / 2 - 1);
                        var44 = (var46.v() + var47.v()) / 2.0D;
                     } else {
                        var46 = var27.b(var22 / 2);
                        var44 = var46.v();
                     }

                     var54 = (float)(var3 - var44) / (float)(var7.z() - var7.D()) * var1.N().i();
                     if (var7.p()) {
                        var54 = -var54;
                     }

                     var55 = zkq.a(var0, var1, var2, 0.0F, var43, var18, var26 + 1, var20.size());
                     var48 = zkq.a(var0, var1, var2, var54, var43, var18, var26 + 1, var20.size());
                     var49 = new com.aspose.cells.b.a.b.zo(0.0F, 0.0F);
                     if (var1.D() >= 90 && var1.D() < 270) {
                        var49.a((var55[1].d() + var48[1].d()) / 2.0F);
                        var49.b((var55[1].e() + var48[1].e()) / 2.0F);
                     } else {
                        var49.a((var55[0].d() + var48[0].d()) / 2.0F);
                        var49.b((var55[0].e() + var48[0].e()) / 2.0F);
                     }

                     var50 = new Object[]{var26, var36, var49};
                     com.aspose.cells.b.a.a.ze.a(var11, (Object)var50);
                  }
               }
            }

            a(var0, var1, (zbcp)var25, (zjd)var28, var19, (ArrayList)var29);
            var29.clear();
            var19.clear();
            zkq.c(var0, var1, var11);
            var11.clear();
         }
      }

   }

   static void a(zn var0, zif var1, float var2, double var3, int var5, boolean var6) throws Exception {
      if (var5 >= 2) {
         zbcr var7 = var1.z();
         int var8 = var7.getCount();
         zbo var9 = var1.E();
         zbo var10 = var1.e();
         if (var10.k() == 2) {
            a(var0, var1, var2, var3, var6);
         } else {
            float var11 = (float)var1.m() / 100.0F;
            float var12 = (float)var1.n() / 100.0F;
            float var13 = (float)var1.o() / 100.0F;
            float var14 = 0.0F;
            if (!var9.p()) {
               var14 = var1.N().f() - var1.N().i() + (float)var9.z() / (float)(var9.z() - var9.D()) * var1.N().i();
            } else {
               var14 = var1.N().f() - (float)var9.z() / (float)(var9.z() - var9.D()) * var1.N().i();
            }

            ArrayList var15 = new ArrayList();
            boolean var16 = false;
            boolean var17 = var10.f() || var1.u();
            int var52;
            if (var17) {
               var52 = var5;
            } else {
               var52 = var5 - 1;
               if (var52 == 0) {
                  var52 = 1;
               }
            }

            float var18 = var1.N().g() / (float)var52;
            float var19 = var18 * var11 / (1.0F + var12);
            ArrayList var20 = new ArrayList();
            ArrayList var21 = new ArrayList();

            for(int var22 = 0; var22 < var5; ++var22) {
               float var23 = var1.N().e() + var18 * (float)var22;
               if (var17) {
                  var23 += var18 / 2.0F;
               }

               com.aspose.cells.b.a.b.zo[] var24 = a(var1, var23, var19, var14, var0);
               com.aspose.cells.b.a.a.ze.a(var21, (Object)var24);
            }

            com.aspose.cells.b.a.a.ze.a(var20, (Object)var21);
            ArrayList var53 = var7.j();
            zjd[] var54 = new zjd[var53.size()];
            ArrayList[] var55 = new ArrayList[var53.size()];
            ArrayList var25 = null;

            for(int var26 = 0; var26 < var53.size(); ++var26) {
               zbcp var27 = (zbcp)var53.get(var26);
               int var28 = var27.ai();
               int var29 = var26;
               zjf var30 = var27.D();
               ArrayList var31 = new ArrayList();
               if (var26 == 0) {
                  var25 = var21;
               }

               ArrayList var32 = new ArrayList();

               for(int var33 = 0; var33 < var5; ++var33) {
                  float var35 = var18 * (float)var33;
                  var35 += var1.N().e();
                  if (var17) {
                     var35 += var18 / 2.0F;
                  }

                  int var36 = var33;
                  if (var10.p()) {
                     var36 = var5 - 1 - var33;
                  }

                  zjd var37 = var30.b(var36);
                  com.aspose.cells.b.a.a.ze.a(var32, (Object)var37);
                  double var38 = 0.0D;
                  double var40 = 0.0D;
                  double var42 = 0.0D;
                  int var44;
                  zjd var45;
                  double var46;
                  if (var37 != null) {
                     var54[var26] = var37;
                     var38 = Math.abs(var37.v());
                     var40 = var38;

                     for(var44 = 0; var44 < var29; ++var44) {
                        var45 = ((zbcp)var53.get(var44)).D().b(var36);
                        if (var45 != null) {
                           var46 = Math.abs(var45.v());
                           var40 += Math.abs(var46);
                        }
                     }
                  }

                  for(var44 = 0; var44 < var53.size(); ++var44) {
                     var45 = ((zbcp)var53.get(var44)).D().b(var36);
                     if (var45 != null) {
                        var46 = var45.v();
                        var42 += Math.abs(var46);
                     }
                  }

                  float var56;
                  if (!var6) {
                     var56 = (float)var40 / (float)(var9.z() - var9.D()) * var1.N().i();
                  } else {
                     if (var42 == 0.0D) {
                        com.aspose.cells.b.a.a.ze.a(var31, var25.get(var33));
                        continue;
                     }

                     var56 = (float)var40 * 100.0F / (float)var42 / (float)(var9.z() - var9.D()) * var1.N().i();
                  }

                  if (var9.p()) {
                     var56 = -var56;
                  }

                  com.aspose.cells.b.a.b.zo[] var57 = a(var1, var35, var19, var14 - var56, var0);
                  com.aspose.cells.b.a.a.ze.a(var31, (Object)var57);
                  if (var37 != null && !var37.a()) {
                     com.aspose.cells.b.a.b.zo[] var47;
                     if (!var27.aA() && var25.size() > var33) {
                        com.aspose.cells.b.a.b.zo var58 = new com.aspose.cells.b.a.b.zo(0.0F, 0.0F);
                        var47 = (com.aspose.cells.b.a.b.zo[])((com.aspose.cells.b.a.b.zo[])var25.get(var33));
                        if (var1.D() >= 90 && var1.D() < 270) {
                           var58.a(var57[1].d());
                           var58.b((var47[1].e() + var57[1].e()) / 2.0F);
                        } else {
                           var58.a(var57[0].d());
                           var58.b((var47[0].e() + var57[0].e()) / 2.0F);
                        }

                        Object[] var48 = new Object[]{var28, var36, var58};
                        com.aspose.cells.b.a.a.ze.a(var15, (Object)var48);
                     }

                     if (var33 == var5 - 1) {
                        com.aspose.cells.b.a.b.zo[] var59 = (com.aspose.cells.b.a.b.zo[])((com.aspose.cells.b.a.b.zo[])var31.get(var5 / 2 - 1));
                        var47 = (com.aspose.cells.b.a.b.zo[])((com.aspose.cells.b.a.b.zo[])var31.get(var5 / 2));
                        com.aspose.cells.b.a.b.zo[] var60 = (com.aspose.cells.b.a.b.zo[])((com.aspose.cells.b.a.b.zo[])var25.get(var5 / 2 - 1));
                        com.aspose.cells.b.a.b.zo[] var49 = (com.aspose.cells.b.a.b.zo[])((com.aspose.cells.b.a.b.zo[])var25.get(var5 / 2));
                        if (var5 % 2 != 0) {
                           var47 = (com.aspose.cells.b.a.b.zo[])((com.aspose.cells.b.a.b.zo[])var31.get(var5 / 2 + 1));
                           var49 = (com.aspose.cells.b.a.b.zo[])((com.aspose.cells.b.a.b.zo[])var25.get(var5 / 2 + 1));
                        }

                        com.aspose.cells.b.a.b.zo var50 = new com.aspose.cells.b.a.b.zo(0.0F, 0.0F);
                        if (var1.D() >= 90 && var1.D() < 270) {
                           var50.a((var59[1].d() + var60[1].d() + var47[1].d() + var49[1].d()) / 4.0F);
                           var50.b((var59[1].e() + var60[1].e() + var47[1].e() + var49[1].e()) / 4.0F);
                        } else {
                           var50.a((var59[0].d() + var60[0].d() + var47[0].d() + var49[0].d()) / 4.0F);
                           var50.b((var59[0].e() + var60[0].e() + var47[0].e() + var49[0].e()) / 4.0F);
                        }

                        Object[] var51 = new Object[]{var28, 0, var50};
                        com.aspose.cells.b.a.a.ze.a(var15, (Object)var51);
                     }
                  }
               }

               com.aspose.cells.b.a.a.ze.a(var20, (Object)var31);
               var55[var26] = var32;
               var25 = var31;
            }

            a(var0, var1, (List)var53, (zjd[])var54, var20, (ArrayList[])var55);
            zkq.c(var0, var1, var15);
         }
      }
   }

   private static void a(zn var0, zif var1, float var2, double var3, boolean var5) throws Exception {
      zbcr var6 = var1.z();
      int var7 = var6.getCount();
      zbo var8 = var1.E();
      zbo var9 = var1.e();
      float var10 = (float)var1.m() / 100.0F;
      float var11 = (float)var1.n() / 100.0F;
      float var12 = (float)var1.o() / 100.0F;
      float var13 = 0.0F;
      if (!var8.p()) {
         var13 = var1.N().f() - var1.N().i() + (float)var8.z() / (float)(var8.z() - var8.D()) * var1.N().i();
      } else {
         var13 = var1.N().f() - (float)var8.z() / (float)(var8.z() - var8.D()) * var1.N().i();
      }

      ArrayList var14 = new ArrayList();
      int var15 = var9.j();
      int var16 = (int)var9.D();
      int var17 = (int)var9.z();
      boolean var18 = false;
      boolean var19 = var9.f() || var1.u();
      int var60;
      if (var19) {
         var60 = zbq.a(var15, var17, var16, var1.S()) + 1;
      } else {
         var60 = zbq.a(var15, var17, var16, var1.S());
         if (var60 == 0) {
            var60 = 1;
         }
      }

      float var20 = var1.N().g() / (float)var60;
      float var21 = var20 * var10 / (1.0F + var11);
      ArrayList var22 = zhz.a((List)var1.z().c(), var1.S());
      int var23 = var22.size();
      ArrayList var24 = new ArrayList();
      ArrayList var25 = new ArrayList();

      for(int var26 = 0; var26 < var23; ++var26) {
         int var27 = com.aspose.cells.b.a.zo.a(com.aspose.cells.b.a.zr.a(var22.get(var26)));
         var27 = zbq.a(var15, var27, var1.S());
         int var28 = zbq.a(var15, var27, (int)var9.D(), var1.S());
         float var29 = var20 * (float)var28;
         float var30 = var1.N().e() + var29;
         if (var19) {
            var30 += var20 / 2.0F;
         }

         com.aspose.cells.b.a.b.zo[] var31 = a(var1, var30, var21, var13, var0);
         com.aspose.cells.b.a.a.ze.a(var25, (Object)var31);
      }

      com.aspose.cells.b.a.a.ze.a(var24, (Object)var25);
      ArrayList var61 = var6.j();
      zjd[] var62 = new zjd[var61.size()];
      ArrayList[] var63 = new ArrayList[var61.size()];
      ArrayList var64 = null;

      for(int var65 = 0; var65 < var61.size(); ++var65) {
         zbcp var66 = (zbcp)var61.get(var65);
         int var32 = var66.ai();
         int var33 = var65;
         zjf var34 = var66.D();
         ArrayList var35 = new ArrayList();
         if (var65 == 0) {
            var64 = var25;
         }

         ArrayList var36 = new ArrayList();

         for(int var37 = 0; var37 < var23; ++var37) {
            int var39 = com.aspose.cells.b.a.zo.a(com.aspose.cells.b.a.zr.a(var22.get(var37)));
            var39 = zbq.a(var15, var39, var1.S());
            int var40 = zbq.a(var15, var39, (int)var9.D(), var1.S());
            float var41 = var20 * (float)var40;
            float var42 = var1.N().e() + var41;
            if (var19) {
               var42 += var20 / 2.0F;
            }

            int var43 = var37;
            if (var9.p()) {
               var43 = var23 - 1 - var37;
            }

            zjd var44 = var34.b(var43);
            com.aspose.cells.b.a.a.ze.a(var36, (Object)var44);
            double var45 = 0.0D;
            double var47 = 0.0D;
            double var49 = 0.0D;
            int var51;
            zjd var52;
            double var53;
            if (var44 != null) {
               var62[var65] = var44;
               var45 = Math.abs(var44.v());
               var47 = var45;

               for(var51 = 0; var51 < var33; ++var51) {
                  var52 = ((zbcp)var61.get(var51)).D().b(var43);
                  if (var52 != null) {
                     var53 = Math.abs(var52.v());
                     var47 += var53;
                  }
               }
            }

            for(var51 = 0; var51 < var61.size(); ++var51) {
               var52 = ((zbcp)var61.get(var51)).D().b(var43);
               if (var52 != null && !var44.a()) {
                  var53 = var52.v();
                  var49 += Math.abs(var53);
               }
            }

            float var10000 = (float)((var3 - var45) / (var8.z() - var8.D()) * (double)var1.N().i());
            float var67;
            if (!var5) {
               var67 = (float)(var47 / (var8.z() - var8.D()) * (double)var1.N().i());
            } else {
               if (var49 == 0.0D) {
                  com.aspose.cells.b.a.a.ze.a(var35, var64.get(var37));
                  continue;
               }

               var67 = (float)var47 * 100.0F / (float)var49 / (float)(var8.z() - var8.D()) * var1.N().i();
            }

            if (var8.p()) {
               var67 = -var67;
            }

            com.aspose.cells.b.a.b.zo[] var68 = a(var1, var42, var21, var13 - var67, var0);
            com.aspose.cells.b.a.a.ze.a(var35, (Object)var68);
            if (var44 != null && !var44.a()) {
               com.aspose.cells.b.a.b.zo[] var55;
               if (!var66.aA() && var64.size() > var37) {
                  com.aspose.cells.b.a.b.zo var54 = new com.aspose.cells.b.a.b.zo(0.0F, 0.0F);
                  var55 = (com.aspose.cells.b.a.b.zo[])((com.aspose.cells.b.a.b.zo[])var64.get(var37));
                  if (var1.D() >= 90 && var1.D() < 270) {
                     var54.a(var68[1].d());
                     var54.b((var55[1].e() + var68[1].e()) / 2.0F);
                  } else {
                     var54.a(var68[0].d());
                     var54.b((var55[0].e() + var68[0].e()) / 2.0F);
                  }

                  Object[] var56 = new Object[]{var32, var43, var54};
                  com.aspose.cells.b.a.a.ze.a(var14, (Object)var56);
               }

               if (var37 == var23 - 1) {
                  com.aspose.cells.b.a.b.zo[] var69 = (com.aspose.cells.b.a.b.zo[])((com.aspose.cells.b.a.b.zo[])var35.get(var23 / 2 - 1));
                  var55 = (com.aspose.cells.b.a.b.zo[])((com.aspose.cells.b.a.b.zo[])var35.get(var23 / 2));
                  com.aspose.cells.b.a.b.zo[] var70 = (com.aspose.cells.b.a.b.zo[])((com.aspose.cells.b.a.b.zo[])var64.get(var23 / 2 - 1));
                  com.aspose.cells.b.a.b.zo[] var57 = (com.aspose.cells.b.a.b.zo[])((com.aspose.cells.b.a.b.zo[])var64.get(var23 / 2));
                  if (var23 % 2 != 0) {
                     var55 = (com.aspose.cells.b.a.b.zo[])((com.aspose.cells.b.a.b.zo[])var35.get(var23 / 2 + 1));
                     var57 = (com.aspose.cells.b.a.b.zo[])((com.aspose.cells.b.a.b.zo[])var64.get(var23 / 2 + 1));
                  }

                  com.aspose.cells.b.a.b.zo var58 = new com.aspose.cells.b.a.b.zo(0.0F, 0.0F);
                  if (var1.D() >= 90 && var1.D() < 270) {
                     var58.a((var69[1].d() + var70[1].d() + var55[1].d() + var57[1].d()) / 4.0F);
                     var58.b((var69[1].e() + var70[1].e() + var55[1].e() + var57[1].e()) / 4.0F);
                  } else {
                     var58.a((var69[0].d() + var70[0].d() + var55[0].d() + var57[0].d()) / 4.0F);
                     var58.b((var69[0].e() + var70[0].e() + var55[0].e() + var57[0].e()) / 4.0F);
                  }

                  Object[] var59 = new Object[]{var32, 0, var58};
                  com.aspose.cells.b.a.a.ze.a(var14, (Object)var59);
               }
            }
         }

         var64 = var35;
         var63[var65] = var36;
         com.aspose.cells.b.a.a.ze.a(var24, (Object)var35);
      }

      a(var0, var1, (List)var61, (zjd[])var62, var24, (ArrayList[])var63);
      zkq.c(var0, var1, var14);
   }

   private static void a(zn var0, zif var1, zbcp var2, zjd var3, List var4, ArrayList var5) {
      int var6;
      com.aspose.cells.b.a.b.zo[] var8;
      com.aspose.cells.b.a.b.zo[] var9;
      for(var6 = 0; var6 < var5.size(); ++var6) {
         zjd var7 = (zjd)var5.get(var6);
         if (var7 != null) {
            var8 = (com.aspose.cells.b.a.b.zo[])((com.aspose.cells.b.a.b.zo[])var4.get(var6 * 2 + 1));
            var9 = (com.aspose.cells.b.a.b.zo[])((com.aspose.cells.b.a.b.zo[])var4.get(var6 * 2));

            for(int var10 = 0; var10 < var8.length; ++var10) {
               com.aspose.cells.b.a.a.ze.a(var7.b, (Object)var8[var10]);
               com.aspose.cells.b.a.a.ze.a(var7.d, (Object)var9[var10]);
            }
         }
      }

      if (var4.size() >= 4 && var3 != null) {
         var6 = var4.size() / 2;
         com.aspose.cells.b.a.b.zo[] var19 = new com.aspose.cells.b.a.b.zo[var6];
         var8 = new com.aspose.cells.b.a.b.zo[var6];
         var9 = new com.aspose.cells.b.a.b.zo[var6];
         com.aspose.cells.b.a.b.zo[] var20 = new com.aspose.cells.b.a.b.zo[var6];
         zbuk.a(var19);
         zbuk.a(var8);
         zbuk.a(var9);
         zbuk.a(var20);

         int var11;
         com.aspose.cells.b.a.b.zo[] var12;
         com.aspose.cells.b.a.b.zo[] var13;
         for(var11 = 0; var11 < var4.size(); var11 += 2) {
            var12 = (com.aspose.cells.b.a.b.zo[])((com.aspose.cells.b.a.b.zo[])var4.get(var11));
            var13 = (com.aspose.cells.b.a.b.zo[])((com.aspose.cells.b.a.b.zo[])var4.get(var11 + 1));
            var19[var11 / 2] = var12[0];
            var8[var11 / 2] = var12[1];
            var9[var11 / 2] = var13[0];
            var20[var11 / 2] = var13[1];
         }

         for(var11 = 1; var11 < var6; ++var11) {
            var12 = new com.aspose.cells.b.a.b.zo[8];
            zbuk.a(var12);
            var13 = null;
            com.aspose.cells.b.a.b.zo var14 = null;
            com.aspose.cells.b.a.b.zo[] var15 = new com.aspose.cells.b.a.b.zo[]{var13};
            boolean var16 = a(var19[var11 - 1], var19[var11], var9[var11 - 1], var9[var11], var15);
            com.aspose.cells.b.a.b.zo var21 = var15[0];
            if (var16) {
               com.aspose.cells.b.a.b.zo[] var17 = new com.aspose.cells.b.a.b.zo[]{var14};
               boolean var18 = a(var8[var11 - 1], var8[var11], var20[var11 - 1], var20[var11], var17);
               var14 = var17[0];
               if (var18) {
                  var12[0] = var19[var11 - 1];
                  var12[1] = var21;
                  var12[2] = var14;
                  var12[3] = var8[var11 - 1];
                  var12[4] = var9[var11 - 1];
                  var12[5] = var21;
                  var12[6] = var14;
                  var12[7] = var20[var11 - 1];
                  a(var0, var1, var3, var12);
                  var12[0] = var21;
                  var12[1] = var19[var11];
                  var12[2] = var8[var11];
                  var12[3] = var14;
                  var12[4] = var21;
                  var12[5] = var9[var11];
                  var12[6] = var20[var11];
                  var12[7] = var14;
                  a(var0, var1, var3, var12);
               }
            } else {
               var12[0] = var19[var11 - 1];
               var12[1] = var19[var11];
               var12[2] = var8[var11];
               var12[3] = var8[var11 - 1];
               var12[4] = var9[var11 - 1];
               var12[5] = var9[var11];
               var12[6] = var20[var11];
               var12[7] = var20[var11 - 1];
               a(var0, var1, var3, var12);
            }
         }

         a(var0, var1, var3, var19, var8, var9, var20);
      }
   }

   private static boolean a(com.aspose.cells.b.a.b.zo var0, com.aspose.cells.b.a.b.zo var1, com.aspose.cells.b.a.b.zo var2, com.aspose.cells.b.a.b.zo var3, com.aspose.cells.b.a.b.zo[] var4) {
      var4[0] = new com.aspose.cells.b.a.b.zo(0.0F, 0.0F);
      if (var0.d() != var1.d() && var2.d() != var3.d()) {
         float var5 = (var0.e() - var1.e()) / (var0.d() - var1.d());
         float var6 = var0.e() - var5 * var0.d();
         float var7 = (var2.e() - var3.e()) / (var2.d() - var3.d());
         float var8 = var2.e() - var7 * var2.d();
         if (var5 == var7) {
            return false;
         } else {
            var4[0].a((var8 - var6) / (var5 - var7));
            var4[0].b(var5 * var4[0].d() + var6);
            return var0.d() < var4[0].d() && var1.d() > var4[0].d() && var2.d() < var4[0].d() && var3.d() > var4[0].d() || var0.d() > var4[0].d() && var1.d() < var4[0].d() && var2.d() > var4[0].d() && var3.d() < var4[0].d();
         }
      } else {
         return false;
      }
   }

   private static void a(zn var0, zif var1, zjd var2, com.aspose.cells.b.a.b.zo[] var3) {
      zas var4 = var2.i();
      com.aspose.cells.b.a.b.zm var5 = zama.a(var2.k());

      try {
         boolean var6 = var3[0].e() + var3[1].e() + var3[2].e() + var3[3].e() > var3[4].e() + var3[5].e() + var3[6].e() + var3[7].e();
         com.aspose.cells.b.a.b.a.ze var7;
         com.aspose.cells.b.a.b.zc var8;
         com.aspose.cells.b.a.b.a.ze var9;
         com.aspose.cells.b.a.b.zc var10;
         if (var1.p() > 0) {
            if (var6) {
               var7 = new com.aspose.cells.b.a.b.a.ze();
               var7.b(new com.aspose.cells.b.a.b.zo[]{var3[0], var3[1], var3[2], var3[3]});
               var8 = zax.a(var4, com.aspose.cells.a.c.zn.a(var7), 0.6666667F);

               try {
                  var0.a(var8, var7);
               } finally {
                  if (var8 != null) {
                     var8.f();
                  }

               }

               var0.a(var5, var7);
               var9 = new com.aspose.cells.b.a.b.a.ze();
               var9.b(new com.aspose.cells.b.a.b.zo[]{var3[4], var3[5], var3[6], var3[7]});
               var10 = zax.a(var4, com.aspose.cells.a.c.zn.a(var9), 0.6666667F);

               try {
                  var0.a(var10, var9);
               } finally {
                  if (var10 != null) {
                     var10.f();
                  }

               }

               var0.a(var5, var9);
            } else {
               var7 = new com.aspose.cells.b.a.b.a.ze();
               var7.b(new com.aspose.cells.b.a.b.zo[]{var3[4], var3[5], var3[6], var3[7]});
               var8 = zax.a(var4, com.aspose.cells.a.c.zn.a(var7), 0.6666667F);

               try {
                  var0.a(var8, var7);
               } finally {
                  if (var8 != null) {
                     var8.f();
                  }

               }

               var0.a(var5, var7);
               var9 = new com.aspose.cells.b.a.b.a.ze();
               var9.b(new com.aspose.cells.b.a.b.zo[]{var3[0], var3[1], var3[2], var3[3]});
               var10 = zax.a(var4, com.aspose.cells.a.c.zn.a(var9), 0.6666667F);

               try {
                  var0.a(var10, var9);
               } finally {
                  if (var10 != null) {
                     var10.f();
                  }

               }

               var0.a(var5, var9);
            }
         } else if (!var6) {
            var7 = new com.aspose.cells.b.a.b.a.ze();
            var7.b(new com.aspose.cells.b.a.b.zo[]{var3[0], var3[1], var3[2], var3[3]});
            var8 = zax.a(var4, com.aspose.cells.a.c.zn.a(var7), 0.6666667F);

            try {
               var0.a(var8, var7);
            } finally {
               if (var8 != null) {
                  var8.f();
               }

            }

            var0.a(var5, var7);
            var9 = new com.aspose.cells.b.a.b.a.ze();
            var9.b(new com.aspose.cells.b.a.b.zo[]{var3[4], var3[5], var3[6], var3[7]});
            var10 = zax.a(var4, com.aspose.cells.a.c.zn.a(var9), 0.6666667F);

            try {
               var0.a(var10, var9);
            } finally {
               if (var10 != null) {
                  var10.f();
               }

            }

            var0.a(var5, var9);
         } else {
            var7 = new com.aspose.cells.b.a.b.a.ze();
            var7.b(new com.aspose.cells.b.a.b.zo[]{var3[4], var3[5], var3[6], var3[7]});
            var8 = zax.a(var4, com.aspose.cells.a.c.zn.a(var7), 0.6666667F);

            try {
               var0.a(var8, var7);
            } finally {
               if (var8 != null) {
                  var8.f();
               }

            }

            var0.a(var5, var7);
            var9 = new com.aspose.cells.b.a.b.a.ze();
            var9.b(new com.aspose.cells.b.a.b.zo[]{var3[0], var3[1], var3[2], var3[3]});
            var10 = zax.a(var4, com.aspose.cells.a.c.zn.a(var9), 0.6666667F);

            try {
               var0.a(var10, var9);
            } finally {
               if (var10 != null) {
                  var10.f();
               }

            }

            var0.a(var5, var9);
         }

         if (var1.D() > 90 && var1.D() != 360) {
            if (var1.D() > 90 && var1.D() <= 180) {
               var7 = new com.aspose.cells.b.a.b.a.ze();
               var7.b(new com.aspose.cells.b.a.b.zo[]{var3[1], var3[2], var3[6], var3[5]});
               var8 = zax.a(var4, com.aspose.cells.a.c.zn.a(var7), 0.5F);

               try {
                  var0.a(var8, var7);
               } finally {
                  if (var8 != null) {
                     var8.f();
                  }

               }

               var0.a(var5, var7);
            } else if (var1.D() > 180 && var1.D() <= 270) {
               var7 = new com.aspose.cells.b.a.b.a.ze();
               var7.b(new com.aspose.cells.b.a.b.zo[]{var3[1], var3[2], var3[6], var3[5]});
               var8 = zax.a(var4, com.aspose.cells.a.c.zn.a(var7), 0.5F);

               try {
                  var0.a(var8, var7);
               } finally {
                  if (var8 != null) {
                     var8.f();
                  }

               }

               var0.a(var5, var7);
            } else if (var1.D() > 270 && var1.D() < 360) {
               var7 = new com.aspose.cells.b.a.b.a.ze();
               var7.b(new com.aspose.cells.b.a.b.zo[]{var3[1], var3[2], var3[6], var3[5]});
               var8 = zax.a(var4, com.aspose.cells.a.c.zn.a(var7), 0.5F);

               try {
                  var0.a(var8, var7);
               } finally {
                  if (var8 != null) {
                     var8.f();
                  }

               }

               var0.a(var5, var7);
            }
         } else {
            var7 = new com.aspose.cells.b.a.b.a.ze();
            var7.b(new com.aspose.cells.b.a.b.zo[]{var3[1], var3[2], var3[6], var3[5]});
            var8 = zax.a(var4, com.aspose.cells.a.c.zn.a(var7), 0.5F);

            try {
               var0.a(var8, var7);
            } finally {
               if (var8 != null) {
                  var8.f();
               }

            }

            var0.a(var5, var7);
         }
      } finally {
         if (var5 != null) {
            var5.r();
         }

      }

   }

   private static void a(zn var0, zif var1, zjd var2, com.aspose.cells.b.a.b.zo[] var3, com.aspose.cells.b.a.b.zo[] var4, com.aspose.cells.b.a.b.zo[] var5, com.aspose.cells.b.a.b.zo[] var6) {
      zas var7 = var2.i();
      com.aspose.cells.b.a.b.zm var8 = zama.a(var2.k());

      try {
         com.aspose.cells.b.a.b.zo[] var9;
         int var10;
         com.aspose.cells.b.a.b.zc var11;
         com.aspose.cells.b.a.b.a.ze var27;
         if (var1.D() <= 90 || var1.D() == 360 || var1.D() > 270 && var1.D() < 360) {
            var9 = new com.aspose.cells.b.a.b.zo[var3.length * 2];
            zbuk.a(var9);

            for(var10 = 0; var10 < var3.length; ++var10) {
               var9[var10] = var3[var10];
               var9[var9.length - 1 - var10] = var5[var10];
            }

            var27 = new com.aspose.cells.b.a.b.a.ze();
            var27.b(var9);
            var11 = zax.a(var7, com.aspose.cells.a.c.zn.a(var27));

            try {
               var0.a(var11, var27);
            } finally {
               if (var11 != null) {
                  var11.f();
               }

            }

            var0.a(var8, var27);
         } else if (var1.D() > 90 && var1.D() <= 180 || var1.D() > 180 && var1.D() <= 270) {
            var9 = new com.aspose.cells.b.a.b.zo[var4.length * 2];
            zbuk.a(var9);

            for(var10 = 0; var10 < var4.length; ++var10) {
               var9[var10] = var4[var10];
               var9[var9.length - 1 - var10] = var6[var10];
            }

            var27 = new com.aspose.cells.b.a.b.a.ze();
            var27.b(var9);
            var11 = zax.a(var7, com.aspose.cells.a.c.zn.a(var27));

            try {
               var0.a(var11, var27);
            } finally {
               if (var11 != null) {
                  var11.f();
               }

            }

            var0.a(var8, var27);
         }
      } finally {
         if (var8 != null) {
            var8.r();
         }

      }

   }

   private static com.aspose.cells.b.a.b.zo[] a(zif var0, float var1, float var2, float var3, zn var4) {
      com.aspose.cells.b.a.b.zo[] var5 = new com.aspose.cells.b.a.b.zo[2];
      zbuk.a(var5);
      float var7 = var0.N().j();
      float var6;
      if (var1 <= var7) {
         var6 = 2.0F * (var7 - var1);
         var5[0] = zkq.a(var0, var3, var6, var2, 0);
         var5[1] = zkq.a(var0, var3, var6, var2, 3);
      } else {
         var6 = 2.0F * (var1 - var7);
         var5[0] = zkq.a(var0, var3, var6, var2, 1);
         var5[1] = zkq.a(var0, var3, var6, var2, 2);
      }

      return var5;
   }

   private static void a(zn var0, zif var1, List var2, zjd[] var3, List var4, ArrayList[] var5) {
      List var9;
      for(int var6 = 0; var6 < var5.length; ++var6) {
         ArrayList var7 = var5[var6];
         List var8 = (List)var4.get(var6 + 1);
         var9 = (List)var4.get(0);

         for(int var10 = 0; var10 < var7.size(); ++var10) {
            zjd var11 = (zjd)var7.get(var10);
            com.aspose.cells.b.a.b.zo[] var12 = (com.aspose.cells.b.a.b.zo[])((com.aspose.cells.b.a.b.zo[])var8.get(var10));
            com.aspose.cells.b.a.b.zo[] var13 = (com.aspose.cells.b.a.b.zo[])((com.aspose.cells.b.a.b.zo[])var9.get(var10));

            for(int var14 = 0; var14 < var12.length; ++var14) {
               com.aspose.cells.b.a.a.ze.a(var11.b, (Object)var12[var14]);
               com.aspose.cells.b.a.a.ze.a(var11.d, (Object)var13[var14]);
            }
         }
      }

      if (var4.size() >= 2) {
         List var142 = (List)var4.get(0);
         zbcp var143 = (zbcp)var2.get(var2.size() - 1);
         zas var144 = var143.A();
         if (var4.size() >= 2) {
            var9 = (List)var4.get(1);
            List var145 = (List)var4.get(var4.size() - 1);
            com.aspose.cells.b.a.b.zo[] var146 = null;

            int var147;
            com.aspose.cells.b.a.b.zo[] var19;
            com.aspose.cells.b.a.b.zo[] var159;
            for(var147 = 1; var147 < var142.size(); ++var147) {
               if (var1.p() >= 0) {
                  int var148 = var4.size() - 1;
                  com.aspose.cells.b.a.b.zm var150 = zama.a(var143.z());

                  try {
                     com.aspose.cells.b.a.b.zo[][] var15 = new com.aspose.cells.b.a.b.zo[][]{var146};
                     boolean var16 = a(var145, var142, var147, var15);
                     var146 = var15[0];
                     List var17;
                     com.aspose.cells.b.a.b.zo[] var18;
                     com.aspose.cells.b.a.b.a.ze var20;
                     com.aspose.cells.b.a.b.zc var21;
                     if (!var1.E().p()) {
                        if (a(var145, var142, var147)) {
                           var17 = (List)var4.get(var148);
                           if (var17.size() > var147) {
                              var18 = new com.aspose.cells.b.a.b.zo[4];
                              zbuk.a(var18);
                              var19 = (com.aspose.cells.b.a.b.zo[])((com.aspose.cells.b.a.b.zo[])var17.get(var147 - 1));
                              var18[0] = var19[0];
                              var18[1] = var19[1];
                              var19 = (com.aspose.cells.b.a.b.zo[])((com.aspose.cells.b.a.b.zo[])var17.get(var147));
                              var18[2] = var19[1];
                              var18[3] = var19[0];
                              var20 = new com.aspose.cells.b.a.b.a.ze();
                              var20.b(var18);
                              var21 = zax.a(var144, com.aspose.cells.a.c.zn.a(var20), 0.6666667F);

                              try {
                                 var0.a(var21, var20);
                              } finally {
                                 if (var21 != null) {
                                    var21.f();
                                 }

                              }

                              var0.a(var150, var20);
                           }
                        }
                     } else if (var16) {
                        var17 = (List)var4.get(var148);
                        var18 = new com.aspose.cells.b.a.b.zo[4];
                        zbuk.a(var18);
                        var19 = (com.aspose.cells.b.a.b.zo[])((com.aspose.cells.b.a.b.zo[])var17.get(var147 - 1));
                        com.aspose.cells.b.a.b.zc var22;
                        com.aspose.cells.b.a.b.a.ze var160;
                        if (var146[0].e() >= var19[0].e()) {
                           var159 = (com.aspose.cells.b.a.b.zo[])((com.aspose.cells.b.a.b.zo[])var142.get(var147 - 1));
                           var18[0] = var159[0];
                           var18[1] = var159[1];
                           var18[2] = var146[1];
                           var18[3] = var146[0];
                           var160 = new com.aspose.cells.b.a.b.a.ze();
                           var160.b(var18);
                           var22 = zax.a(var144, com.aspose.cells.a.c.zn.a(var160), 0.6666667F);

                           try {
                              var0.a(var22, var160);
                           } finally {
                              if (var22 != null) {
                                 var22.f();
                              }

                           }

                           var0.a(var150, var160);
                        } else {
                           var18[0] = var19[0];
                           var18[1] = var19[1];
                           var18[2] = var146[1];
                           var18[3] = var146[0];
                           var20 = new com.aspose.cells.b.a.b.a.ze();
                           var20.b(var18);
                           var21 = zax.a(var144, com.aspose.cells.a.c.zn.a(var20), 0.6666667F);

                           try {
                              var0.a(var21, var20);
                           } finally {
                              if (var21 != null) {
                                 var21.f();
                              }

                           }

                           var0.a(var150, var20);
                        }

                        var19 = (com.aspose.cells.b.a.b.zo[])((com.aspose.cells.b.a.b.zo[])var17.get(var147));
                        if (var146[0].e() >= var19[0].e()) {
                           var159 = (com.aspose.cells.b.a.b.zo[])((com.aspose.cells.b.a.b.zo[])var142.get(var147));
                           var18[0] = var159[0];
                           var18[1] = var159[1];
                           var18[2] = var146[1];
                           var18[3] = var146[0];
                           var160 = new com.aspose.cells.b.a.b.a.ze();
                           var160.b(var18);
                           var22 = zax.a(var144, com.aspose.cells.a.c.zn.a(var160), 0.6666667F);

                           try {
                              var0.a(var22, var160);
                           } finally {
                              if (var22 != null) {
                                 var22.f();
                              }

                           }

                           var0.a(var150, var160);
                        } else {
                           var18[0] = var19[0];
                           var18[1] = var19[1];
                           var18[2] = var146[1];
                           var18[3] = var146[0];
                           var20 = new com.aspose.cells.b.a.b.a.ze();
                           var20.b(var18);
                           var21 = zax.a(var144, com.aspose.cells.a.c.zn.a(var20), 0.6666667F);

                           try {
                              var0.a(var21, var20);
                           } finally {
                              if (var21 != null) {
                                 var21.f();
                              }

                           }

                           var0.a(var150, var20);
                        }
                     }
                  } finally {
                     if (var150 != null) {
                        var150.r();
                     }

                  }
               }
            }

            com.aspose.cells.b.a.b.zm var149;
            List var151;
            List var152;
            com.aspose.cells.b.a.b.zo[] var155;
            com.aspose.cells.b.a.b.a.ze var156;
            com.aspose.cells.b.a.b.zc var158;
            for(var147 = 1; var147 < var4.size(); ++var147) {
               var143 = (zbcp)var2.get(var147 - 1);
               var144 = var143.A();
               var149 = zama.a(var143.z());

               try {
                  var151 = (List)var4.get(var147 - 1);
                  var152 = (List)var4.get(var147);
                  com.aspose.cells.b.a.b.zo[] var153;
                  if (var1.D() <= 180) {
                     var153 = (com.aspose.cells.b.a.b.zo[])((com.aspose.cells.b.a.b.zo[])var151.get(var151.size() - 1));
                     var155 = (com.aspose.cells.b.a.b.zo[])((com.aspose.cells.b.a.b.zo[])var152.get(var152.size() - 1));
                  } else {
                     var153 = (com.aspose.cells.b.a.b.zo[])((com.aspose.cells.b.a.b.zo[])var151.get(0));
                     var155 = (com.aspose.cells.b.a.b.zo[])((com.aspose.cells.b.a.b.zo[])var152.get(0));
                  }

                  var156 = new com.aspose.cells.b.a.b.a.ze();
                  var156.b(new com.aspose.cells.b.a.b.zo[]{var153[0], var153[1], var155[1], var155[0]});
                  var158 = zax.a(var144, com.aspose.cells.a.c.zn.a(var156), 0.5F);

                  try {
                     var0.a(var158, var156);
                  } finally {
                     if (var158 != null) {
                        var158.f();
                     }

                  }

                  var0.a(var149, var156);
               } finally {
                  if (var149 != null) {
                     var149.r();
                  }

               }
            }

            for(var147 = 1; var147 < var4.size(); ++var147) {
               var143 = (zbcp)var2.get(var147 - 1);
               var144 = var143.A();
               var149 = zama.a(var143.z());

               try {
                  var151 = (List)var4.get(var147 - 1);
                  var152 = (List)var4.get(var147);
                  int var154 = var152.size() * 2;
                  var155 = new com.aspose.cells.b.a.b.zo[var154];
                  zbuk.a(var155);

                  for(int var157 = 0; var157 < var151.size(); ++var157) {
                     if (var152.size() > var157) {
                        var19 = (com.aspose.cells.b.a.b.zo[])((com.aspose.cells.b.a.b.zo[])var151.get(var157));
                        var159 = (com.aspose.cells.b.a.b.zo[])((com.aspose.cells.b.a.b.zo[])var152.get(var157));
                        if (var1.D() > 90 && var1.D() != 360 && (var1.D() <= 270 || var1.D() >= 360)) {
                           var155[var157] = var19[1];
                           var155[var154 - var157 - 1] = var159[1];
                        } else {
                           var155[var157] = var19[0];
                           var155[var154 - var157 - 1] = var159[0];
                        }
                     }
                  }

                  var156 = new com.aspose.cells.b.a.b.a.ze();
                  var156.b(var155);
                  var158 = zax.a(var144, com.aspose.cells.a.c.zn.a(var156));

                  try {
                     var0.a(var158, var156);
                  } finally {
                     if (var158 != null) {
                        var158.f();
                     }

                  }

                  var0.a(var149, var156);
               } finally {
                  if (var149 != null) {
                     var149.r();
                  }

               }
            }
         }

      }
   }

   private static boolean a(List var0, List var1, int var2) {
      if (var0.size() <= var2) {
         return true;
      } else {
         com.aspose.cells.b.a.b.zo var3 = ((com.aspose.cells.b.a.b.zo[])((com.aspose.cells.b.a.b.zo[])var0.get(var2 - 1)))[0];
         com.aspose.cells.b.a.b.zo var4 = ((com.aspose.cells.b.a.b.zo[])((com.aspose.cells.b.a.b.zo[])var0.get(var2)))[0];
         com.aspose.cells.b.a.b.zo var5 = ((com.aspose.cells.b.a.b.zo[])((com.aspose.cells.b.a.b.zo[])var1.get(var2 - 1)))[0];
         com.aspose.cells.b.a.b.zo var6 = ((com.aspose.cells.b.a.b.zo[])((com.aspose.cells.b.a.b.zo[])var1.get(var2)))[0];
         return var3.e() <= var5.e() && var4.e() <= var6.e();
      }
   }

   private static boolean a(List var0, List var1, int var2, com.aspose.cells.b.a.b.zo[][] var3) {
      var3[0] = new com.aspose.cells.b.a.b.zo[2];
      if (var0.size() <= var2) {
         return false;
      } else {
         com.aspose.cells.b.a.b.zo var4 = ((com.aspose.cells.b.a.b.zo[])((com.aspose.cells.b.a.b.zo[])var0.get(var2 - 1)))[0];
         com.aspose.cells.b.a.b.zo var5 = ((com.aspose.cells.b.a.b.zo[])((com.aspose.cells.b.a.b.zo[])var0.get(var2)))[0];
         com.aspose.cells.b.a.b.zo var6 = ((com.aspose.cells.b.a.b.zo[])((com.aspose.cells.b.a.b.zo[])var1.get(var2 - 1)))[0];
         com.aspose.cells.b.a.b.zo var7 = ((com.aspose.cells.b.a.b.zo[])((com.aspose.cells.b.a.b.zo[])var1.get(var2)))[0];
         com.aspose.cells.b.a.b.zo var8 = null;
         com.aspose.cells.b.a.b.zo var9 = null;
         com.aspose.cells.b.a.b.zo[] var10 = new com.aspose.cells.b.a.b.zo[]{var8};
         boolean var11 = a(var4, var5, var6, var7, var10);
         var8 = var10[0];
         var4 = ((com.aspose.cells.b.a.b.zo[])((com.aspose.cells.b.a.b.zo[])var0.get(var2 - 1)))[1];
         var5 = ((com.aspose.cells.b.a.b.zo[])((com.aspose.cells.b.a.b.zo[])var0.get(var2)))[1];
         var6 = ((com.aspose.cells.b.a.b.zo[])((com.aspose.cells.b.a.b.zo[])var1.get(var2 - 1)))[1];
         var7 = ((com.aspose.cells.b.a.b.zo[])((com.aspose.cells.b.a.b.zo[])var1.get(var2)))[1];
         com.aspose.cells.b.a.b.zo[] var12 = new com.aspose.cells.b.a.b.zo[]{var9};
         a(var4, var5, var6, var7, var12);
         var9 = var12[0];
         zbuk.a(var3[0]);
         var3[0][0] = var8;
         var3[0][1] = var9;
         return var11;
      }
   }
}
